diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-07-21 21:56:15 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-07-21 21:56:15 +0300 |
commit | d3328034c7fcb020f590249779750b6d25d75110 (patch) | |
tree | ec0411c4b66be08a06a023361fbf6ddfca222e51 | |
parent | 8fa309f9f8633786f6340de2221c14032f4b7bb7 (diff) | |
parent | f8dd135b19d370d8273423637d354d734801c077 (diff) |
Merge pull request #62 from hughperkins/fix-gradOutputBuffer-type-change
"nesting.lua:36: bad argument #1 to 'resizeAs'"
-rw-r--r-- | gmodule.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gmodule.lua b/gmodule.lua index 3a3d9fe..4c37525 100644 --- a/gmodule.lua +++ b/gmodule.lua @@ -192,6 +192,13 @@ function gModule:type(type) -- Loop through modules and convert data self:apply(function(module) module:type(type) end) + + for i,node in ipairs(self.backwardnodes) do + if node.data.gradOutputBuffer ~= nil then + node.data.gradOutputBuffer = node.data.gradOutputBuffer:type(type) + end + end + return self end |