I tried to run the code in torch tutorial, but when i wanna run it on gpu using :cuda(), I keep receiving the following error
/opt/zbstudio/bin/linux/x64/lua: /home/andybug/torch/install/share/lua/5.1/nn/THNN.lua:110: bad argument #3 to 'v' (cannot convert 'struct THCudaTensor *' to 'struct THCudaLongTensor *') stack traceback: [C]: in function 'v' /home/andybug/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'ClassNLLCriterion_updateOutput' ...bug/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:41: in function 'forward' ...ug/torch/install/share/lua/5.1/nn/StochasticGradient.lua:35: in function 'train' /home/andybug/Documents/NLP/lua torch/torch-prac/main.lua:74: in main chunk [C]: at 0x00404f08
googled this problem but no valid answers, tried reinstall nn, cunn, .etc, which didn't work.