Closed alashkari closed 7 years ago
Are you also using -cudnn 1
on the command line?
I am using the pre-trained model with evaluate.lua script, which doesn't have -cudnn as the input. During the training of the pre-trained model, Yes.
You should also use -cudnn 1
for translation.
See https://github.com/harvardnlp/seq2seq-attn/blob/master/s2sa/beam.lua#L44.
Thank you Guillaumekln. You saved me. I added (-cudnn -gpuid and char_dict) and it is perfectly working now.
Hello everyone,
I am trying to run a pre-trained model on my machine. The problem is that when I intend to load the model, I get this error:
~/torch/install/bin/luajit: ~/.luarocks/share/lua/5.1/torch/File.lua:343: unknown Torch class
stack traceback:
[C]: in function 'error'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:343: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:353: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:353: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
...
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:351: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/rui/.luarocks/share/lua/5.1/torch/File.lua:409: in function 'load'
./beam.lua:505: in function 'init'
evaluate.lua:5: in function 'main'
I should tell you that I have installed Cuda (V8) and cuDNN, and I don't have any problem when I start to train the model myself. This error occurs when I try to use a pre-trained model.
Thank you for your time and help in advance.