diff options
Diffstat (limited to 'Pointwise.lua')
-rw-r--r-- | Pointwise.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Pointwise.lua b/Pointwise.lua index aecfe08..56a374c 100644 --- a/Pointwise.lua +++ b/Pointwise.lua @@ -50,7 +50,8 @@ end function Pointwise:updateGradInput(input, gradOutput) assert((gradOutput:dim() == 4 or gradOutput:dim() == 3)); if not gradOutput:isContiguous() then - self._gradOutput = self._gradOutput or gradOutput.new():resizeAs(gradOutput) + self._gradOutput = self._gradOutput + or gradOutput.new():resizeAs(gradOutput) self._gradOutput:copy(gradOutput) gradOutput = self._gradOutput end |