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

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-08-24 00:41:44 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-08-24 00:41:44 +0400
commit053e1ebb03bd889ff04e6fcb4eac3a42da6517ad (patch)
tree106f29f7535f4b8f52417933660f0beb43840a4f
parent1b54395416e9fda3153f8501a7825e847ef96df1 (diff)
Added modules to spatial fovea, to be backward compat with containers.
-rw-r--r--SpatialFovea.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/SpatialFovea.lua b/SpatialFovea.lua
index deaba65..11215c5 100644
--- a/SpatialFovea.lua
+++ b/SpatialFovea.lua
@@ -68,6 +68,9 @@ function SpatialFovea:__init(...)
.. #self.ratios, 'nn.SpatialFovea')
end
+ -- to be compatible with classical container modules
+ self.modules = self.processors
+
-- reset
self:reset()
end
@@ -305,9 +308,9 @@ function SpatialFovea:reset(stdv)
end
end
-function SpatialFovea:zeroGradParameters(momentum)
+function SpatialFovea:zeroGradParameters()
for idx = 1,#self.processors do
- self.processors[idx]:zeroGradParameters(momentum)
+ self.processors[idx]:zeroGradParameters()
end
end
@@ -317,12 +320,6 @@ function SpatialFovea:updateParameters(learningRate)
end
end
-function SpatialFovea:decayParameters(decay)
- for idx = 1,#self.processors do
- self.processors[idx]:decayParameters(decay)
- end
-end
-
function SpatialFovea:write(file)
parent.write(self, file)
file:writeInt(self.nInputPlane)
@@ -369,4 +366,5 @@ function SpatialFovea:read(file)
self.gradPadded = {}
self.gradPreProcessed = {}
self.gradPyramid = {}
+ self.modules = self.processors
end