jcjohnson / neural-style

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

cant open neural_style.lua #168

Open JeffCrusey opened 8 years ago

JeffCrusey commented 8 years ago

Got through the install according to directions but received the following error. any idea what i might be doing wrong here? Thx =)

bash-3.2$ th neural_style.lua -style_image 2.jpg -content_image 1.jpg /Users/jeffcrusey/torch/install/bin/luajit: cannot open neural_style.lua: No such file or directory stack traceback: [C]: in function 'dofile' ...usey/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x0106281bc0

thatother1guy commented 8 years ago

I have the same error.

jcjohnson commented 8 years ago

Make sure you are in the neural-style folder.

JeffCrusey commented 8 years ago

thank you, should i call the neural-style directory before hand? this is new territory for me =)

thatother1guy commented 8 years ago

Thanks!

@JeffCrusey before running the image processing command you should change the directory, the command is something like this: cd/home/yourUserName/neural-style

I'm still running into errors with LuaRocks and cutorch, but that might solve your problem.

thatother1guy commented 8 years ago

I'm getting the same error message as you again. I thought cutorch was for nvidia GPUs only, so I don't understand why it's demanding it be used. I'm running in a virtualbox so I'm not trying to use it.

htoyryla commented 8 years ago

thatother1guy notifications@github.com kirjoitti 12.3.2016 kello 8.09:

I'm getting the same error message as you again. I thought cutorch was for nvidia GPUs only, so I don't understand why it's demanding it be used. I'm running in a virtualbox so I'm not trying to use it

If you don’t have gpu, add the option -gpu -1 to the command. This is stated in the FAQ part of the readme file.

br Hannu

thatother1guy commented 8 years ago

Thanks! That's my mistake I should have seen that.

@JeffCrusey You should change the directory to /Users/jeffcrusey/neural-style, and not extend it to the examples folder.

JeffCrusey commented 8 years ago

=(

Jeffs-MacBook-Pro-2:~ jeffcrusey$ cd /Users/jeffcrusey/neural-style Jeffs-MacBook-Pro-2:neural-style jeffcrusey$ bash bash-3.2$ th neural_style.lua -style_image 2.jpg -content_image 1.jpg /Users/jeffcrusey/torch/install/bin/luajit: ...rs/jeffcrusey/torch/install/share/lua/5.1/trepl/init.lua:384: module 'cutorch' not found:No LuaRocks module found for cutorch no field package.preload['cutorch'] no file '/Users/jeffcrusey/.luarocks/share/lua/5.1/cutorch.lua' no file '/Users/jeffcrusey/.luarocks/share/lua/5.1/cutorch/init.lua' no file '/Users/jeffcrusey/torch/install/share/lua/5.1/cutorch.lua' no file '/Users/jeffcrusey/torch/install/share/lua/5.1/cutorch/init.lua' no file './cutorch.lua' no file '/Users/jeffcrusey/torch/install/share/luajit-2.1.0-beta1/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 '/Users/jeffcrusey/.luarocks/lib/lua/5.1/cutorch.so' no file '/Users/jeffcrusey/torch/install/lib/lua/5.1/cutorch.so' no file '/Users/jeffcrusey/torch/install/lib/cutorch.dylib' 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' ...rs/jeffcrusey/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require' neural_style.lua:51: in function 'main' neural_style.lua:500: in main chunk [C]: in function 'dofile' ...usey/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x010ba00bc0 bash-3.2$

thatother1guy commented 8 years ago

You forgot to add -gpu -1. The command should be something like this:

th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -gpu -1

JeffCrusey commented 8 years ago

success!!! thank you so much