diff options
author | soumith <soumith@fb.com> | 2015-07-15 04:09:53 +0300 |
---|---|---|
committer | soumith <soumith@fb.com> | 2015-07-15 04:09:53 +0300 |
commit | bae4ff855aaa207bdfc747c827ab6aab8891a9dc (patch) | |
tree | 48bc2381f551fa286e47bd9888ef3080a4537d28 /Pooling.lua | |
parent | f34f3a6609314b384a8de3daef3eb62902e99e69 (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.lua | 4 |
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 |