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

New version without Squeeze.lua causes error #18

Closed
ghost opened this issue Mar 23, 2016 · 4 comments
Closed

New version without Squeeze.lua causes error #18

ghost opened this issue Mar 23, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 23, 2016

Hi:

The previous version using Squeeze.lua works fine.
I would like to test sample.lua but it does not work with the previous version.

I'm new to lua/torch and I would like to sample from this model as per karpathy's original.

When I run the new version without Squeeze.lua I get the following error which is referencing 'Squeeze':

ne-time setup: preprocessing input train/valid/test files in dir: data/ptb
Processing text into tensors...
After first pass of data, max word length is: 26
Token count: train 10124, val 1408, test 3570
done
saving data/ptb/vocab.t7
saving data/ptb/data.t7
saving data/ptb/data_char.t7
loading data files...
Word vocab size: 4040, Char vocab size: 71
reshaping tensors...
data load done. Number of batches in train: 14, val: 2, test: 1
Word vocab size: 4040, Char vocab size: 71, Max word length (incl. padding): 26
creating an LSTM-CNN with 2 layers
/home/pixelhead/torch/install/bin/luajit: ./model/TDNN.lua:35: attempt to call field 'Squeeze' (a nil value)
stack traceback:
./model/TDNN.lua:35: in function 'tdnn'
./model/LSTMTDNN.lua:53: in function 'lstmtdnn'
main.lua:150: in main chunk
[C]: in function 'dofile'
...head/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

Is there another switch I should set to fix this?

Thanks,

@yoonkim
Copy link
Owner

yoonkim commented Mar 23, 2016

Try updating your nn package.

@ghost ghost mentioned this issue Mar 23, 2016
@ghost
Copy link
Author

ghost commented Mar 23, 2016

Thanks for getting back to me. I ran luarocks list:
nn
scm-1 (installed) - /home/pixelhead/torch/install/lib/luarocks/rocks
ran again: luarocks install nn
same nn-scm-1.rockspec but when running main.lua a different error referencing 'TestSuite':

home/pixelhead/torch/install/bin/luajit: /home/pixelhead/torch/install/share/lua/5.1/trepl/init.lua:383: /home/pixelhead/torch/install/share/lua/5.1/trepl/init.lua:383: /home/pixelhead/torch/install/share/lua/5.1/nn/test.lua:12: attempt to call field 'TestSuite' (a nil value)
stack traceback:
[C]: in function 'error'
/home/pixelhead/torch/install/share/lua/5.1/trepl/init.lua:383: in function 'require'
main.lua:11: in main chunk
[C]: in function 'dofile'
...head/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

Should I update all modules listed under "luarocks list" ??? I'm new to torch/lua. I have karpathy's version including sample-beam.lua running without a problem and would like to compare sampled output from your program.

@yoonkim
Copy link
Owner

yoonkim commented Mar 24, 2016

Can you try updating torch/cunn too?

luarocks install torch
luarocks install cunn

It worked for me when I installed the latest versions.

@ghost
Copy link
Author

ghost commented Mar 24, 2016

Thanks. That worked.

Cheers

@ghost ghost closed this as completed Mar 24, 2016
This issue was closed.
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

1 participant