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

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2016-10-14 01:31:16 +0300
committerGitHub <noreply@github.com>2016-10-14 01:31:16 +0300
commit817910bb2576e1b3a9848e63ea2052d3dc0636d9 (patch)
treeef6d0014d008fd328fccde1cc13fc8a38a827e30
parentff8ae89f1399131c5199c6d81fafea20de434851 (diff)
parentdbec20a513cbf2070d77413fe3dac8e9c554e2a9 (diff)
Merge pull request #275 from thuyen/SFCBW
Add backward compatiblity to SpatialFullConvolution
-rw-r--r--SpatialFullConvolution.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/SpatialFullConvolution.lua b/SpatialFullConvolution.lua
index 7d766d4..419d23c 100644
--- a/SpatialFullConvolution.lua
+++ b/SpatialFullConvolution.lua
@@ -306,6 +306,7 @@ end
function SpatialFullConvolution:updateOutput(input)
+ self:backCompatibility()
if not self.weightDesc then self:resetWeightDescriptors() end
self:createIODescriptors(input)
@@ -331,6 +332,7 @@ function SpatialFullConvolution:updateOutput(input)
end
function SpatialFullConvolution:updateGradInput(input, gradOutput)
+ self:backCompatibility()
if not self.gradInput then return end
self.gradInput:resizeAs(input)
@@ -352,6 +354,7 @@ function SpatialFullConvolution:updateGradInput(input, gradOutput)
end
function SpatialFullConvolution:accGradParameters(input, gradOutput, scale)
+ self:backCompatibility()
self.scaleT = self.scaleT or self.weight.new(1)
-- this line forces this member to always be on CPU (needed for cudnn)
self.scaleT = torch.type(self.weight) == 'torch.CudaDoubleTensor'