Run main.lua without CUDA failed: invalid arguments: LongTensor DoubleTensor
Opened this issue · 2 comments
I run main.lua after removing cuda calls in main.lua and train.lua, but failed.
Could you take a look at this?
Here is the log:
~/captcha.irctc$ th main.lua
parsing file: data/ans.txt
parsing done
parameters size ..
17961588
[torch.LongStorage of size 1]
1 50
loss..14.563473590949
/home/azureuser/torch/install/bin/luajit: ./train.lua:17: invalid arguments: LongTensor DoubleTensor
expected arguments: [ByteTensor] LongTensor long | LongTensor LongTensor long | [ByteTensor] LongTensor LongTensor | LongTensor LongTensor LongTensor
stack traceback:
[C]: in function 'eq'
./train.lua:17: in function 'accuracy'
./train.lua:70: in function 'sgd'
main.lua:16: in main chunk
[C]: in function 'dofile'
...user/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
Thanks
Hi i have the same issue, did you find the solution if yes then please share
same issue here ...when running without GPU.
th captcha.lua
parsing file: /home/jalaj/torch/captcha/simple/ans.txt
parsing done
parameters size ..
18485876
[torch.LongStorage of size 1]
loss..3.589507818222
/home/jalaj/torch/install/bin/luajit: ./train.lua:17: invalid arguments: LongTensor FloatTensor
expected arguments: [ByteTensor] LongTensor long | LongTensor LongTensor long | [ByteTensor] LongTensor LongTensor | LongTensor LongTensor LongTensor
stack traceback:
[C]: in function 'eq'
./train.lua:17: in function 'accuracy'
./train.lua:70: in function 'sgd'
captcha.lua:28: in main chunk
[C]: in function 'dofile'
...alaj/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670