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-11-11 19:38:11 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-11-11 19:38:11 +0400
commit98fb40a126afb2f33800af2f081d3119a8b55448 (patch)
treeb811fd62ac82766bc9d1a49f4d9e99cdc52ec8fa /Probe.lua
parenta8ab27537e16f4440565fbebe6313b2172b489a1 (diff)
Upgraded all code to new torch master.torch-master
Diffstat (limited to 'Probe.lua')
-rw-r--r--Probe.lua26
1 files changed, 4 insertions, 22 deletions
diff --git a/Probe.lua b/Probe.lua
index 3c93cd3..ea8527c 100644
--- a/Probe.lua
+++ b/Probe.lua
@@ -11,11 +11,11 @@ function Probe:__init(...)
{arg='backw', type='boolean', help='activates probe for backward()', default=false})
end
-function Probe:forward(input)
+function Probe:updateOutput(input)
self.output = input
if self.size or self.content then
print('')
- print('<probe::' .. self.name .. '> forward()')
+ print('<probe::' .. self.name .. '> updateOutput()')
if self.content then print(input)
elseif self.size then print(#input)
end
@@ -26,12 +26,12 @@ function Probe:forward(input)
return self.output
end
-function Probe:backward(input, gradOutput)
+function Probe:updateGradInput(input, gradOutput)
self.gradInput = gradOutput
if self.backw then
if self.size or self.content then
print('')
- print('<probe::' .. self.name .. '> backward()')
+ print('<probe::' .. self.name .. '> updateGradInput()')
if self.content then print(gradOutput)
elseif self.size then print(#gradOutput)
end
@@ -42,21 +42,3 @@ function Probe:backward(input, gradOutput)
end
return self.gradInput
end
-
-function Probe:write(file)
- parent.write(self, file)
- file:writeObject(self.name)
- file:writeBool(self.content)
- file:writeBool(self.display)
- file:writeBool(self.size)
- file:writeBool(self.backw)
-end
-
-function Probe:read(file)
- parent.read(self, file)
- self.name = file:readObject()
- self.content = file:readBool()
- self.display = file:readBool()
- self.size = file:readBool()
- self.backw = file:readBool()
-end