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:
authorSoumith Chintala <soumith@gmail.com>2015-05-13 07:52:25 +0300
committerSoumith Chintala <soumith@gmail.com>2015-05-13 07:52:25 +0300
commit8b9b5cd7a7e1887fc0be1b60537c79d770fe8e1f (patch)
tree4dac9719dcfae1e1a1944e62779eb54236d070d6 /Module.lua
parent905ea8c1a4033af2af0f90e92e16597f442f3512 (diff)
parentd30ab5a0f6871e8efc27f9cd833241ac32363dd7 (diff)
Merge pull request #256 from colesbury/lua52
Rename unpack to table.unpack for Lua 5.2
Diffstat (limited to 'Module.lua')
-rw-r--r--Module.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Module.lua b/Module.lua
index be7896c..c2075b8 100644
--- a/Module.lua
+++ b/Module.lua
@@ -146,7 +146,7 @@ function Module:getParameters()
if storageAndOffset == nil then
return nil
end
- local _, offset = unpack(storageAndOffset)
+ local _, offset = table.unpack(storageAndOffset)
return offset
end
@@ -200,7 +200,7 @@ function Module:getParameters()
end
for _, storageAndOffset in pairs(storages) do
- local k, v = unpack(storageAndOffset)
+ local k, v = table.unpack(storageAndOffset)
flatParameters[{{v+1,v+k:size()}}]:copy(Tensor():set(k))
end