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 /BatchNormalization.lua
parent4a433463fcd17c4ec3242586da7e9fc859feb3ae (diff)
nn.clearState
Diffstat (limited to 'BatchNormalization.lua')
-rw-r--r--BatchNormalization.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/BatchNormalization.lua b/BatchNormalization.lua
index a1c18d4..32a437c 100644
--- a/BatchNormalization.lua
+++ b/BatchNormalization.lua
@@ -154,3 +154,14 @@ function BN:accGradParameters(input, gradOutput, scale)
self.gradBias:add(scale, self.buffer)
end
end
+
+function BN:clearState()
+ nn.utils.clear(self, {
+ 'buffer',
+ 'buffer2',
+ 'centered',
+ 'std',
+ 'normalized',
+ })
+ return parent.clearState(self)
+end