From dd9d7fd996a476ef0af0e39b7039a761745df943 Mon Sep 17 00:00:00 2001 From: Adam Lerer Date: Wed, 24 Jun 2015 14:44:29 -0700 Subject: nn.Module preserve type sharing semantics (#187); add nn.Module.apply --- Euclidean.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Euclidean.lua') diff --git a/Euclidean.lua b/Euclidean.lua index ae3fee9..25aa2e4 100644 --- a/Euclidean.lua +++ b/Euclidean.lua @@ -171,7 +171,7 @@ function Euclidean:accGradParameters(input, gradOutput, scale) end end -function Euclidean:type(type) +function Euclidean:type(type, tensorCache) if type then -- prevent premature memory allocations self._input = nil @@ -186,5 +186,5 @@ function Euclidean:type(type) self._repeat = nil self._repeat2 = nil end - return parent.type(self, type) + return parent.type(self, type, tensorCache) end -- cgit v1.2.3