diff options
Diffstat (limited to 'gmodule.lua')
-rw-r--r-- | gmodule.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gmodule.lua b/gmodule.lua index 99698c0..674bcf9 100644 --- a/gmodule.lua +++ b/gmodule.lua @@ -11,8 +11,8 @@ local function getTotalGradOutput(node) node.data.gradOutputBuffer = node.data.gradOutputBuffer or nesting.cloneNested(gradOutput[1]) local gobuff = node.data.gradOutputBuffer nesting.resizeNestedAs(gobuff, gradOutput[1]) - nesting.fillNested(gobuff, 0) - for i=1,#gradOutput do + nesting.copyNested(gobuff, gradOutput[1]) + for i=2,#gradOutput do nesting.addNestedTo(gobuff, gradOutput[i]) end gradOutput = gobuff |