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>2012-01-26 22:36:48 +0400
committerClement Farabet <clement.farabet@gmail.com>2012-01-26 22:36:48 +0400
commit6402f6b13f5c8a4c3adcbbe64889531666af4fde (patch)
tree84c6fea4259951795a4998a8f0302601b0d22250 /SpatialFovea.lua
parent49c569bd81f5c0afcec42b74c63d932cf1dd950a (diff)
Better fovea print
Diffstat (limited to 'SpatialFovea.lua')
-rw-r--r--SpatialFovea.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/SpatialFovea.lua b/SpatialFovea.lua
index 528b422..ece18bf 100644
--- a/SpatialFovea.lua
+++ b/SpatialFovea.lua
@@ -373,16 +373,16 @@ function SpatialFovea:__tostring__()
local line = '\n'
local next = ' |`-> '
local ext = ' | '
- local extlast = ' '
local last = ' ... -> '
local str = 'nn.SpatialFovea'
str = str .. ' {' .. line .. tab .. 'input'
for i=1,#self.processors do
- if i == self.processors then
- str = str .. line .. tab .. next .. '(' .. i .. '): ' .. tostring(self.processors[i]):gsub(line, line .. tab .. extlast)
- else
- str = str .. line .. tab .. next .. '(' .. i .. '): ' .. tostring(self.processors[i]):gsub(line, line .. tab .. ext)
+ local pipeline = nn.Sequential()
+ if self.preProcessors[i] then
+ pipeline:add(self.preProcessors[i])
end
+ pipeline:add(self.processors[i])
+ str = str .. line .. tab .. next .. '(' .. i .. '): ' .. tostring(pipeline):gsub(line, line .. tab .. ext)
end
str = str .. line .. tab .. last .. 'output'
str = str .. line .. '}'