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:
authorSergey Zagoruyko <zagoruyko2@gmail.com>2016-02-12 02:36:15 +0300
committerSergey Zagoruyko <zagoruyko2@gmail.com>2016-02-12 02:36:15 +0300
commit06ff3228dfc4ae32eb2bb55b30ac39aec095e0db (patch)
tree44c3323019f3eb82ec4beb665ab939bb03317d90 /Copy.lua
parentd0a0e9ba6b68fd8392f37e1ac0ad2289260baedf (diff)
fix direct assignment in some modules
Diffstat (limited to 'Copy.lua')
-rw-r--r--Copy.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Copy.lua b/Copy.lua
index d87c2b2..9f83cf9 100644
--- a/Copy.lua
+++ b/Copy.lua
@@ -13,12 +13,12 @@ function Copy:__init(intype, outtype, forceCopy, dontCast)
if (not forceCopy) and intype == outtype then
self.updateOutput = function(self, input)
- self.output = input
+ self.output:set(input)
return input
end
self.updateGradInput = function(self, input, gradOutput)
- self.gradInput = gradOutput
+ self.gradInput:set(gradOutput)
return gradOutput
end
end