From 30585d8561318de99659b4db7472f6b67a88c033 Mon Sep 17 00:00:00 2001 From: Ivo Danihelka Date: Sat, 23 Feb 2013 12:58:35 +0000 Subject: Fixed nn.Copy with default arguments. --- Copy.lua | 4 ++-- 1 file 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() -- cgit v1.2.3