jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.7k forks source link

Multi GPU - Attempt to call field 'GPU' #360

Open emeric-gh opened 7 years ago

emeric-gh commented 7 years ago

I get the following error when I try to use the multi GPU when i use GPU 0,1 /home/ubuntu/torch/install/bin/luajit: neural-style/neural_style.lua:403: attempt to call field 'GPU' (a nil value) stack traceback: neural-style/neural_style.lua:403: in function 'setup_multi_gpu' neural-style/neural_style.lua:153: in function 'main' neural-style/neural_style.lua:604: in main chunk [C]: in function 'dofile' ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670 when i use GPU 0,1,2,3 /home/ubuntu/torch/install/bin/luajit: neural-style/neural_style.lua:372: attempt to get length of local 'gpu_splits' (a nil value) stack traceback: neural-style/neural_style.lua:372: in function 'setup_multi_gpu' neural-style/neural_style.lua:153: in function 'main' neural-style/neural_style.lua:604: in main chunk [C]: in function 'dofile' ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

jcjohnson commented 7 years ago

Update the core torch packages:

luarocks install torch
luarocks install cutorch
luarocks install nn
luarocks install cunn
emeric-gh commented 7 years ago

this did the thing. youre the best

bododge commented 7 years ago

Yep this fixed the issue for me too. Only problem is now I'm inspired to buy a second Titan X.