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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2012-01-25 17:55:20 +0400
committerRonan Collobert <ronan@collobert.com>2012-01-25 17:55:20 +0400
commit4df3893abd1b9f840f1d9a8c1859799ccbf941de (patch)
treee8a1e1cc1b6ea6e47855347b157eaf419fdb357b /Max.lua
initial revamp of torch7 tree
Diffstat (limited to 'Max.lua')
-rw-r--r--Max.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/Max.lua b/Max.lua
new file mode 100644
index 0000000..a5ba95d
--- /dev/null
+++ b/Max.lua
@@ -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