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:
authorAdam Paszke <adam.paszke@gmail.com>2016-04-13 18:20:46 +0300
committerSoumith Chintala <soumith@gmail.com>2016-04-13 18:20:46 +0300
commit9cffea51a9a5065342d6ea80f965d5fad32729e1 (patch)
tree69f50d76b10ed91ef19ff3fb2ec06b7bdb1deb39 /SpatialMaxUnpooling.lua
parent130955e2e6269d820e5e6651ce13eed6549c2150 (diff)
Remove unnecessary function override in unpooling modules (#749)
Doing so breaks deserialization on systems with different architectures. These operations are cheap, so it's not a problem to perform them even when there's no unpooling associated.
Diffstat (limited to 'SpatialMaxUnpooling.lua')
-rw-r--r--SpatialMaxUnpooling.lua9
1 files changed, 1 insertions, 8 deletions
diff --git a/SpatialMaxUnpooling.lua b/SpatialMaxUnpooling.lua
index d88b1dd..408bcc0 100644
--- a/SpatialMaxUnpooling.lua
+++ b/SpatialMaxUnpooling.lua
@@ -2,16 +2,9 @@ local SpatialMaxUnpooling, parent = torch.class('nn.SpatialMaxUnpooling', 'nn.Mo
function SpatialMaxUnpooling:__init(poolingModule)
parent.__init(self)
- assert(torch.type(poolingModule)=='nn.SpatialMaxPooling', 'Argument must be a nn.SPatialMaxPooling module')
+ assert(torch.type(poolingModule)=='nn.SpatialMaxPooling', 'Argument must be a nn.SpatialMaxPooling module')
assert(poolingModule.kH==poolingModule.dH and poolingModule.kW==poolingModule.dW, "The size of pooling module's kernel must be equal to its stride")
self.pooling = poolingModule
-
- poolingModule.updateOutput = function(pool, input)
- local dims = input:dim()
- pool.iheight = input:size(dims-1)
- pool.iwidth = input:size(dims)
- return nn.SpatialMaxPooling.updateOutput(pool, input)
- end
end
function SpatialMaxUnpooling:setParams()