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:
Diffstat (limited to 'Container.lua')
-rw-r--r--Container.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Container.lua b/Container.lua
index 7e264ba..67fac9f 100644
--- a/Container.lua
+++ b/Container.lua
@@ -105,7 +105,7 @@ end
function Container:parameters()
local function tinsert(to, from)
- if type(from) == 'table' then
+ if torch.type(from) == 'table' then
for i=1,#from do
tinsert(to,from[i])
end
@@ -131,7 +131,7 @@ function Container:clearState()
if self[f] then
if torch.isTensor(self[f]) then
self[f] = self[f].new()
- elseif type(self[f]) == 'table' then
+ elseif torch.type(self[f]) == 'table' then
self[f] = {}
else
self[f] = nil