diff options
Diffstat (limited to 'Abs.lua')
-rw-r--r-- | Abs.lua | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Abs.lua b/Abs.lua deleted file mode 100644 index ca17acf..0000000 --- a/Abs.lua +++ /dev/null @@ -1,30 +0,0 @@ -local Abs, parent = torch.class('nn.Abs', 'nn.Module') - -function Abs:__init(args) - parent.__init(self) - if args then - error(xlua.usage('nn.Abs', - 'a simple component-wise mapping: abs()', - 'abs = nn.Abs()\n'.. - 'rectified = abs:forward(sometensor)', - {type='nil', help='no arg required'})) - end -end - -function Abs:forward(input) - input.nn.Abs_forward(self, input) - return self.output -end - -function Abs:backward(input, gradOutput) - input.nn.Abs_backward(self, input, gradOutput) - return self.gradInput -end - -function Abs:write(file) - parent.write(self, file) -end - -function Abs:read(file) - parent.read(self, file) -end |