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

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Zagoruyko <sergey.zagoruyko@imagine.enpc.fr>2015-01-20 17:15:03 +0300
committerSergey Zagoruyko <zagoruyko2@gmail.com>2015-01-22 02:02:50 +0300
commit0d920f20ad47043fb46c27fb7aa55867a1f07e4a (patch)
tree66f213fb532197f7887439b148541a1885ad3a7e /Tanh.lua
parent2b180c57432be23fad28e3cbe195db0f63cfe9aa (diff)
backward compatibility of pointwise activations
Diffstat (limited to 'Tanh.lua')
-rw-r--r--Tanh.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tanh.lua b/Tanh.lua
index 4efb2d4..ac222e6 100644
--- a/Tanh.lua
+++ b/Tanh.lua
@@ -4,3 +4,8 @@ function Tanh:__init(inplace)
parent.__init(self, inplace)
self.mode = 'CUDNN_ACTIVATION_TANH'
end
+
+function Tanh:updateOutput(input)
+ if not self.mode then self.mode = 'CUDNN_ACTIVATION_TANH' end
+ return parent.updateOutput(self, input)
+end