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

Max.lua - github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a5ba95d86d5f50ca2c7daa40b8e9333f758057c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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