Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Simonovsky <simonovm@imagine.enpc.fr>2015-03-26 18:58:10 +0300
committerMartin Simonovsky <simonovm@imagine.enpc.fr>2015-03-26 18:58:10 +0300
commit75964ae9e2c4c6430f3fad7977c182074edb07d1 (patch)
treef3eb91fcd3877b1bc0709a3349310b9e729cf624 /SpatialConvolutionMM.lua
parentb527326b92a322a2ccfcfe7f441cc618be0d5532 (diff)
Resets cache variables when converting between cpu and gpu implementations as these variables are used for different purposes.
Diffstat (limited to 'SpatialConvolutionMM.lua')
-rw-r--r--SpatialConvolutionMM.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/SpatialConvolutionMM.lua b/SpatialConvolutionMM.lua
index 6114567..f27c6fa 100644
--- a/SpatialConvolutionMM.lua
+++ b/SpatialConvolutionMM.lua
@@ -77,3 +77,9 @@ function SpatialConvolutionMM:accGradParameters(input, gradOutput, scale)
input, gradOutput = makeContiguous(self, input, gradOutput)
return input.nn.SpatialConvolutionMM_accGradParameters(self, input, gradOutput, scale)
end
+
+function SpatialConvolutionMM:type(type)
+ self.finput = torch.Tensor()
+ self.fgradInput = torch.Tensor()
+ return parent.type(self,type)
+end