diff options
author | Ronan Collobert <ronan@collobert.com> | 2012-01-25 17:55:20 +0400 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2012-01-25 17:55:20 +0400 |
commit | 4df3893abd1b9f840f1d9a8c1859799ccbf941de (patch) | |
tree | e8a1e1cc1b6ea6e47855347b157eaf419fdb357b /Max.lua |
initial revamp of torch7 tree
Diffstat (limited to 'Max.lua')
-rw-r--r-- | Max.lua | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +local Max, parent = torch.class('nn.Max', 'nn.Module') + +function Max:__init(dimension) + parent.__init(self) + dimension = dimension or 1 + self.dimension = dimension + self.indices = torch.Tensor() +end + +function Max:updateOutput(input) + return input.nn.Max_updateOutput(self, input) +end + +function Max:updateGradInput(input, gradOutput) + return input.nn.Max_updateGradInput(self, input, gradOutput) +end |