It does work well on CPU. However it doesn't on GPU.
When I call 'th main.lua' (i.e I use GPU cause default value of gpuidx = 1)
it says
/home/yjy765/torch/install/bin/luajit: /home/yjy765/torch/install/share/lua/5.1/nn/Linear.lua:55: invalid arguments: CudaTensor number CudaTensor number DoubleTensor CudaTensor
expected arguments: CudaTensor~2D [CudaTensor~2D] [float] CudaTensor~2D CudaTensor~2D | CudaTensor~2D float [CudaTensor~2D] float CudaTensor~2D CudaTensor~2D
stack traceback:
[C]: in function 'addmm'
/home/yjy765/torch/install/share/lua/5.1/nn/Linear.lua:55: in function 'func'
...e/yjy765/torch/install/share/lua/5.1/nngraph/gmodule.lua:275: in function 'neteval'
...e/yjy765/torch/install/share/lua/5.1/nngraph/gmodule.lua:310: in function 'forward'
main.lua:127: in function 'fp'
main.lua:166: in function 'opfunc'
/home/yjy765/torch/install/share/lua/5.1/optim/sgd.lua:44: in function 'sgd'
main.lua:292: in function 'main'
main.lua:336: in main chunk
[C]: in function 'dofile'
...y765/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
It does work well on CPU. However it doesn't on GPU.
When I call 'th main.lua' (i.e I use GPU cause default value of gpuidx = 1)
it says
/home/yjy765/torch/install/bin/luajit: /home/yjy765/torch/install/share/lua/5.1/nn/Linear.lua:55: invalid arguments: CudaTensor number CudaTensor number DoubleTensor CudaTensor expected arguments: CudaTensor~2D [CudaTensor~2D] [float] CudaTensor~2D CudaTensor~2D | CudaTensor~2D float [CudaTensor~2D] float CudaTensor~2D CudaTensor~2D stack traceback: [C]: in function 'addmm' /home/yjy765/torch/install/share/lua/5.1/nn/Linear.lua:55: in function 'func' ...e/yjy765/torch/install/share/lua/5.1/nngraph/gmodule.lua:275: in function 'neteval' ...e/yjy765/torch/install/share/lua/5.1/nngraph/gmodule.lua:310: in function 'forward' main.lua:127: in function 'fp' main.lua:166: in function 'opfunc' /home/yjy765/torch/install/share/lua/5.1/optim/sgd.lua:44: in function 'sgd' main.lua:292: in function 'main' main.lua:336: in main chunk [C]: in function 'dofile' ...y765/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670
I tried to fix but failed.
I wish somebody explain me how to fix it