Neural-style: cant open neural_style.lua

Created on 12 Mar 2016  路  10Comments  路  Source: jcjohnson/neural-style

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

Most helpful comment

Make sure you are in the neural-style folder.

All 10 comments

I have the same error.

Make sure you are in the neural-style folder.

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

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.

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.

thatother1guy [email protected] 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鈥檛 have gpu, add the option -gpu -1 to the command.
This is stated in the FAQ part of the readme file.

br
Hannu

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.

=(

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$

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

success!!! thank you so much

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kurtby picture kurtby  路  10Comments

LouiValley picture LouiValley  路  10Comments

Faiz7412 picture Faiz7412  路  11Comments

IAMJackal picture IAMJackal  路  11Comments

Kamil-Pissaro picture Kamil-Pissaro  路  13Comments