Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to call field 'Unsqueeze' (a nil value) #25

Open
bienbinod opened this issue Mar 31, 2017 · 1 comment
Open

attempt to call field 'Unsqueeze' (a nil value) #25

bienbinod opened this issue Mar 31, 2017 · 1 comment

Comments

@bienbinod
Copy link

Hi,

I installed this package on my machine successfully and passed all the unit test. But when I run code, it shows following error. I would really appreciate �if you could let me know why it is happening. I am new to Torch.

/Users/XXX/torch-cl/install/bin/luajit: ...XXX/torch-cl/install/share/lua/5.1/trepl/init.lua:384: ...dXXX/torch-cl/install/share/lua/5.1/trepl/init.lua:384: ...dXXX/torch-cl/install/share/lua/5.1/rnn/Mufuru.lua:18: attempt to call field 'Unsqueeze' (a nil value) stack traceback: [C]: in function 'error' ...XXXi/torch-cl/install/share/lua/5.1/trepl/init.lua:384: in function 'require' train.lua:1: in main chunk [C]: in function 'dofile' ...i/torch-cl/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x0101f889e0'

@denyazh
Copy link

denyazh commented Apr 13, 2017

You are trying to require a library (rnn) that is trying to call nn.Unsqueeze which is not included in this older nn module. Your code is failing at:
require("rnn")

I had the same issue when trying to require Element-Research's rnn module. I did some browsing through their git version tree and managed to find an older version:

git clone https://github.com/Element-Research/rnn.git
cd rnn
git reset --hard b7ee2fd211 #to switch to the older version of rnn

rm -rf <path to your package install dir>/rnn #to remove the previous installation of rnn
cp ./* <path to your package install dir>/rnn
I did try using luarocks to install the older rnn version but it kept installing the latest version of rnn for some reason.

This did fix the require error but I have no idea if the rnn module works because I was having another error when training my model related to my AMD card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants