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:
authorIvo Danihelka <ivo@danihelka.net>2013-02-23 16:58:35 +0400
committerIvo Danihelka <ivo@danihelka.net>2013-02-23 16:58:35 +0400
commit30585d8561318de99659b4db7472f6b67a88c033 (patch)
tree38489e435606314ecf4a5c106835ea55544643f0 /Copy.lua
parentf328917848bf4b05a097445414210e7f9d1effdc (diff)
Fixed nn.Copy with default arguments.
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 7b6eeb3..83be6ab 100644
--- a/Copy.lua
+++ b/Copy.lua
@@ -1,8 +1,8 @@
local Copy, parent = torch.class('nn.Copy', 'nn.Module')
function Copy:__init(intype, outtype)
- intype = intype or torch.getmetatable(torch.Tensor.__typename)
- outtype = outtype or torch.getmetatable(torch.Tensor.__typename)
+ intype = intype or torch.Tensor.__typename
+ outtype = outtype or torch.Tensor.__typename
parent.__init(self)
self.gradInput = torch.getmetatable(intype).new()