After installing all the libraries & dependencies with no apparent errors, I am trying to run an example:
luis@HP-Pavilion:~/neural-style$ th neural_style.lua -style_image starry_night.jpg,the_scream.jpg
and I obtain the following:
/home/luis/torch/install/bin/luajit: /home/luis/torch/install/share/lua/5.1/trepl/init.lua:378: module 'cutorch' not found:No LuaRocks module found for cutorch
no field package.preload['cutorch']
no file '/home/luis/.luarocks/share/lua/5.1/cutorch.lua'
no file '/home/luis/.luarocks/share/lua/5.1/cutorch/init.lua'
no file '/home/luis/torch/install/share/lua/5.1/cutorch.lua'
no file '/home/luis/torch/install/share/lua/5.1/cutorch/init.lua'
no file './cutorch.lua'
no file '/home/luis/torch/install/share/luajit-2.1.0-alpha/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch/init.lua'
no file '/home/luis/.luarocks/lib/lua/5.1/cutorch.so'
no file '/home/luis/torch/install/lib/lua/5.1/cutorch.so'
no file './cutorch.so'
no file '/usr/local/lib/lua/5.1/cutorch.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'error'
/home/luis/torch/install/share/lua/5.1/trepl/init.lua:378: in function 'require'
neural_style.lua:53: in function 'main'
neural_style.lua:454: in main chunk
[C]: in function 'dofile'
...wick/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
Any idea about what's going on here??
By default it will run in GPU mode, and it's failing because you don't have cutorch installed.
Either install cutorch or add the flag -gpu -1 to run in CPU mode.
Thank you. However, after using CPU mode, I get a different error:
Luis@HP-Pavilion:~/neural-style$ th neural_style.lua -gpu -1 -style_image starry_night.jpg,the_scream.jpg
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
conv2_1: 128 64 3 3
conv2_2: 128 128 3 3
conv3_1: 256 128 3 3
conv3_2: 256 256 3 3
conv3_3: 256 256 3 3
conv3_4: 256 256 3 3
conv4_1: 512 256 3 3
conv4_2: 512 512 3 3
conv4_3: 512 512 3 3
conv4_4: 512 512 3 3
conv5_1: 512 512 3 3
conv5_2: 512 512 3 3
conv5_3: 512 512 3 3
conv5_4: 512 512 3 3
fc6: 1 1 25088 4096
fc7: 1 1 4096 4096
fc8: 1 1 4096 1000
/home/luis/torch/install/bin/luajit: /home/luis/torch/install/share/lua/5.1/image/init.lua:212: cannot open file
stack traceback:
[C]: in function 'load'
/home/luis/torch/install/share/lua/5.1/image/init.lua:212: in function 'loader'
/home/luis/torch/install/share/lua/5.1/image/init.lua:344: in function 'load'
neural_style.lua:78: in function 'main'
neural_style.lua:454: in main chunk
[C]: in function 'dofile'
...luis/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
Looks like it can't find one of the images. Make sure that starry_night.jpg and the_scream.jpg exist; also since you aren't specifying a content image it is using the default of examples/inputs/tubingen.jpg so make sure that exists too.
weird. I have them:
~/neural-style/examples/inputs$ ls
brad_pitt.jpg picasso_selfport1907.jpg the_scream.jpg
escher_sphere.jpg seated-nude.jpg tubingen.jpg
frida_kahlo.jpg shipwreck.jpg woman-with-hat-matisse.jpg
golden_gate.jpg starry_night_crop.png
hoovertowernight.jpg starry_night.jpg
Any other insights? Thank you very much jcjohson. I will post this asa different issue so we can close the previous one. Thanks again.
Try using the command line flag -backend clnn instead of -gpu -1.
See these lines:
if params.backend ~= 'clnn' then
require 'cutorch'
require 'cunn'
cutorch.setDevice(params.gpu + 1)
else
require 'clnn'
require 'cltorch'
cltorch.setDevice(params.gpu + 1)
end
Most helpful comment
By default it will run in GPU mode, and it's failing because you don't have cutorch installed.
Either install cutorch or add the flag
-gpu -1to run in CPU mode.