torch / nn

Other
1.34k stars 967 forks source link

nn.test() fails: Kmeans - invalid arguments (CudaLongTensor) #1311

Open abachaa opened 6 years ago

abachaa commented 6 years ago

Hi, I installed cltorch on Ubuntu 16.04 using this distro https://github.com/hughperkins/distro-cl as luarocks install cltorch is no longer supported.

I got this error when I run nn.test(): luajit -l nn -e 'nn.test()'

/.luarocks/share/lua/5.1/nn/Kmeans.lua:147: invalid arguments: CudaTensor CudaLongTensor CudaTensor number expected arguments: CudaTensor | [CudaTensor] [CudaTensor] CudaTensor index

=> I updated torch and nn, but it doesn't solve the problem: luarocks install torch && luarocks install nn

Any suggestions? Thanks!

stack traceback: [C]: in function 'min' .luarocks/share/lua/5.1/nn/Kmeans.lua:147: in function 'forward' .luarocks/share/lua/5.1/nn/test.lua:8763: in function < .luarocks/share/lua/5.1/nn/test.lua:8717> [C]: in function 'xpcall' .luarocks/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' .luarocks/share/lua/5.1/torch/Tester.lua:436: in function '_run' .luarocks/share/lua/5.1/torch/Tester.lua:355: in function 'run' .luarocks/share/lua/5.1/nn/test.lua:9117: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90

luajit: .luarocks/share/lua/5.1/torch/Tester.lua:363: An error was found while running tests! stack traceback: [C]: in function 'assert' .luarocks/share/lua/5.1/torch/Tester.lua:363: in function 'run' .luarocks/share/lua/5.1/nn/test.lua:9117: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90