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:
authorSoumith Chintala <soumith@gmail.com>2014-09-11 01:54:08 +0400
committerSoumith Chintala <soumith@gmail.com>2014-09-21 03:51:04 +0400
commitecd1ca60adb49dab5eaa317dbb17bf80c540c8ef (patch)
tree0f08e1be714e7418096f5b2b78d4c41929361128 /Tanh.lua
parent4b3f518fcbc21055f60bb7e18fa5b278d9cc8c79 (diff)
fixes #1
Diffstat (limited to 'Tanh.lua')
-rw-r--r--Tanh.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/Tanh.lua b/Tanh.lua
index d1fbcf8..387dbf1 100644
--- a/Tanh.lua
+++ b/Tanh.lua
@@ -9,8 +9,9 @@ function Tanh:__init()
end
function Tanh:createIODescriptors(input)
- if input:size(1) ~= self.iSize:size(1) or input:size(2) ~= self.iSize:size(2)
- or input:size(3) ~= self.iSize:size(3) or input:size(4) ~= self.iSize:size(4) then
+ if input:size(1) ~= self.iSize[1] or input:size(2) ~= self.iSize[2]
+ or input:size(3) ~= self.iSize[3] or input:size(4) ~= self.iSize[4] then
+ self.iSize = input:size()
self.gradInput:resizeAs(input)
self.output:resizeAs(input)
self.iDesc = cudnn.toDescriptor(input)