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 /Identity.lua |
initial revamp of torch7 tree
Diffstat (limited to 'Identity.lua')
-rw-r--r-- | Identity.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Identity.lua b/Identity.lua new file mode 100644 index 0000000..79b5c08 --- /dev/null +++ b/Identity.lua @@ -0,0 +1,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 |