diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2013-06-11 05:45:59 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2013-06-11 05:45:59 +0400 |
commit | b38c39e0cddea4c512a8af6116ca767df8411dd6 (patch) | |
tree | ac28d60cb618555cf10c8ebe34ff410779f61fcd | |
parent | ab8e9f8949f4efc81924d4510d72b509596fbc7b (diff) |
Using a default scale in Module.backward().
This should not affect anything, as modules are always
used within containers. Mostly important during testing.
-rw-r--r-- | Module.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -25,9 +25,10 @@ function Module:forward(input) return self:updateOutput(input) end -function Module:backward(input, gradOutput) +function Module:backward(input, gradOutput, scale) + scale = scale or 1 self:updateGradInput(input, gradOutput) - self:accGradParameters(input, gradOutput) + self:accGradParameters(input, gradOutput, scale) return self.gradInput end |