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:
authorSoumith Chintala <soumith@gmail.com>2015-11-16 06:06:29 +0300
committerSoumith Chintala <soumith@gmail.com>2015-11-16 06:06:29 +0300
commit89d238085d88db340e7778ba299118ecf35b11af (patch)
treec2e2ef8eae91710cf4511793a2b7ce09ea049530 /Identity.lua
parent77f719a399109ce211192f0c2786ac577717f2e8 (diff)
Revert "State variable pointers should never change."
Diffstat (limited to 'Identity.lua')
-rw-r--r--Identity.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Identity.lua b/Identity.lua
index 18a3c9b..088cc34 100644
--- a/Identity.lua
+++ b/Identity.lua
@@ -1,12 +1,12 @@
local Identity, _ = torch.class('nn.Identity', 'nn.Module')
function Identity:updateOutput(input)
- self.output:set(input:storage(), input:storageOffset(), input:size(), input:stride())
+ self.output = input
return self.output
end
function Identity:updateGradInput(input, gradOutput)
- self.gradInput:set(gradOutput:storage(), gradOutput:storageOffset(), gradOutput:size(), gradOutput:stride())
+ self.gradInput = gradOutput
return self.gradInput
end