diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2011-11-11 19:38:11 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2011-11-11 19:38:11 +0400 |
commit | 98fb40a126afb2f33800af2f081d3119a8b55448 (patch) | |
tree | b811fd62ac82766bc9d1a49f4d9e99cdc52ec8fa /Probe.lua | |
parent | a8ab27537e16f4440565fbebe6313b2172b489a1 (diff) |
Upgraded all code to new torch master.torch-master
Diffstat (limited to 'Probe.lua')
-rw-r--r-- | Probe.lua | 26 |
1 files changed, 4 insertions, 22 deletions
@@ -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 |