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

Abs.lua - github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3ccc6afea891a80415fbec6627bd0bcb7c51c6aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local Abs, parent = torch.class('nn.Abs', 'nn.Module')

function Abs:__init()
   parent.__init(self)
end

function Abs:updateOutput(input)
   input.nn.Abs_updateOutput(self, input)
   return self.output
end

function Abs:updateGradInput(input, gradOutput)
   input.nn.Abs_updateGradInput(self, input, gradOutput)
   return self.gradInput
end