Torch7: Getting: atempt to call global 'unpack' (a nil value) error when using torch with lua instead of luaJIT.

Created on 30 Dec 2016  路  3Comments  路  Source: torch/torch7

Here is the full error:

/torch/install/bin/lua: ./util/model_utils.lua:34: attempt to call global 'unpack' (a nil value)
stack traceback:
./util/model_utils.lua:34: in function 'storageInSet'
./util/model_utils.lua:60: in function 'flatten'
./util/model_utils.lua:103: in function 'combine_all_parameters'
train.lua:178: in main chunk
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: in ?

Most helpful comment

to your code

All 3 comments

you can add the line:

local unpack = unpack or table.unpack

Where should i add it? :) @soumith

to your code

Was this page helpful?
0 / 5 - 0 ratings