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 <soumith@gmail.com>2016-03-17 22:11:17 +0300
committersoumith <soumith@gmail.com>2016-03-17 22:11:17 +0300
commit501dc97f6720f448c8e4fc4fa70829230afe987e (patch)
treeeb07331652c86449204e3ef5ad595acf5ac85c33 /SpatialSoftMax.lua
parent75b21693b61365cda1499a841f250f165eef6ed1 (diff)
add _input and _gradOutput to clearState everywhere
Diffstat (limited to 'SpatialSoftMax.lua')
-rw-r--r--SpatialSoftMax.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/SpatialSoftMax.lua b/SpatialSoftMax.lua
index f180526..493477f 100644
--- a/SpatialSoftMax.lua
+++ b/SpatialSoftMax.lua
@@ -30,7 +30,7 @@ function SpatialSoftMax:createIODescriptors(input)
batch = false
end
assert(input:dim() == 4 and input:isContiguous());
-
+
if not self.iDesc or not self.oDesc or
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
@@ -106,6 +106,6 @@ end
function SpatialSoftMax:clearState()
self:clearDesc()
- nn.utils.clear(self, '_gradOutput')
+ self._gradOutput = nil
return parent.clearState(self)
end