diff options
author | Sergey Zagoruyko <zagoruyko2@gmail.com> | 2016-02-04 17:53:04 +0300 |
---|---|---|
committer | Sergey Zagoruyko <zagoruyko2@gmail.com> | 2016-02-09 21:08:41 +0300 |
commit | b4ebdf2f95ee9f1429825a0d7b0948721e407d82 (patch) | |
tree | 77b6183d0c258d07d5f5e6338c48ccb5fc5a877b /SpatialDropout.lua | |
parent | 4a433463fcd17c4ec3242586da7e9fc859feb3ae (diff) |
nn.clearState
Diffstat (limited to 'SpatialDropout.lua')
-rw-r--r-- | SpatialDropout.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SpatialDropout.lua b/SpatialDropout.lua index 37680d4..35daa18 100644 --- a/SpatialDropout.lua +++ b/SpatialDropout.lua @@ -45,3 +45,10 @@ end function SpatialDropout:__tostring__() return string.format('%s(%f)', torch.type(self), self.p) end + +function SpatialDropout:clearState() + if self.noise then + self.noise:set() + end + return Parent.clearState(self) +end |