Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Zagoruyko <zagoruyko2@gmail.com>2016-02-04 17:53:04 +0300
committerSergey Zagoruyko <zagoruyko2@gmail.com>2016-02-09 21:08:41 +0300
commitb4ebdf2f95ee9f1429825a0d7b0948721e407d82 (patch)
tree77b6183d0c258d07d5f5e6338c48ccb5fc5a877b /L1Cost.lua
parent4a433463fcd17c4ec3242586da7e9fc859feb3ae (diff)
nn.clearState
Diffstat (limited to 'L1Cost.lua')
-rw-r--r--L1Cost.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/L1Cost.lua b/L1Cost.lua
index 5c5a89c..6b58e0e 100644
--- a/L1Cost.lua
+++ b/L1Cost.lua
@@ -23,3 +23,8 @@ function L1Cost:updateGradInput(input)
)
return self.gradInput
end
+
+function L1Cost:clearState()
+ if self.output_tensor then self.output_tensor:set() end
+ return parent.clearState(self)
+end