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 <soumith@fb.com>2015-07-15 04:09:53 +0300
committersoumith <soumith@fb.com>2015-07-15 04:09:53 +0300
commitbae4ff855aaa207bdfc747c827ab6aab8891a9dc (patch)
tree48bc2381f551fa286e47bd9888ef3080a4537d28 /Pooling.lua
parentf34f3a6609314b384a8de3daef3eb62902e99e69 (diff)
small bugfixes for Pooling and pointwise where different sized mini-batches are sent at every forward
Diffstat (limited to 'Pooling.lua')
-rw-r--r--Pooling.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Pooling.lua b/Pooling.lua
index cec6ab2..21dd328 100644
--- a/Pooling.lua
+++ b/Pooling.lua
@@ -98,8 +98,8 @@ end
function Pooling:updateGradInput(input, gradOutput)
assert(gradOutput:dim() == 3 or gradOutput:dim() == 4);
if not gradOutput:isContiguous() then
- self._gradOutput = self._gradOutput or gradOutput.new():resizeAs(gradOutput)
- self._gradOutput:copy(gradOutput)
+ self._gradOutput = self._gradOutput or gradOutput.new()
+ self._gradOutput:resizeAs(gradOutput):copy(gradOutput)
gradOutput = self._gradOutput
end
if not self.poolDesc then self:resetPoolDescriptors() end