当尝试使用CUDA运行Torch Lua代码时,出现以下错误跟踪。修改后的LookupTableWithNulls.lua的链接如下。 LookupTableWithNulls.lua
/home/s/sghosh/torch/install/bin/lua: unable to convert argument 2 from
cdata<struct THLongTensor*> to cdata<struct THCudaLongTensor*>
stack traceback:
[C]: in function 'v'
/home/s/sghosh/torch/install/share/lua/5.2/nn/THNN.lua:110: in function 'LookupTable_accGradParameters'
.../neural-checklist-master/layers/LookupTableWithNulls.lua:98: in function 'accGradParameters'
...s/sghosh/torch/install/share/lua/5.2/nngraph/gmodule.lua:479: in function 'neteval'
...s/sghosh/torch/install/share/lua/5.2/nngraph/gmodule.lua:490: in function 'accGradParameters'
/home/s/sghosh/torch/install/share/lua/5.2/nn/Module.lua:32: in function 'backward'
./neural_checklist_model.lua:1553: in function 'backward_pass'
train.lua:126: in function 'train_model'
train.lua:199: in function 'main'
train.lua:203: in main chunk
[C]: in function 'dofile'
...hosh/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?