diff options
author | Nicholas Leonard <nick@nikopia.org> | 2015-03-16 00:15:23 +0300 |
---|---|---|
committer | Nicholas Leonard <nick@nikopia.org> | 2015-03-16 00:15:23 +0300 |
commit | e073f6f1ee2bbb0a130c18e88c1875964a273ea8 (patch) | |
tree | 9b1781b4f20d1227a7f0c4c6190af043ded23eef | |
parent | a54ac28e4261ee62645e4c80ea4db21b02923b6f (diff) |
fixed ZeroGrad:updateOutput
-rw-r--r-- | ZeroGrad.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ZeroGrad.lua b/ZeroGrad.lua index 02f04cc..83f88d2 100644 --- a/ZeroGrad.lua +++ b/ZeroGrad.lua @@ -16,6 +16,11 @@ local function recursiveZero(t1,t2) return t1, t2 end +function ZeroGrad:updateOutput(input) + self.output:set(input) + return self.output +end + -- the gradient is simply zeroed. -- useful when you don't want to backpropgate through certain paths. function ZeroGrad:updateGradInput(input, gradOutput) |