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

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

function Identity:updateOutput(input)
   self.output = input
   return self.output
end


function Identity:updateGradInput(input, gradOutput)
   self.gradInput = gradOutput
   return self.gradInput
end