jcjohnson / fast-neural-style

Feedforward style transfer
4.28k stars 815 forks source link

stdin:1: syntax error near 'fast_neural_style' #82

Open jmbh opened 7 years ago

jmbh commented 7 years ago

Installed torch and then the 4 packages as required. When I then run the example, however, I get the following error(s):

th fast_neural_style.lua \ stdin:1: syntax error near 'fast_neural_style' -model models/eccv16/starry_night.t7 \ stdin:1: unexpected symbol near '-' -input_image images/content/chicago.jpg \ stdin:1: unexpected symbol near '-' -output_image out.png

Any help would be greatly appreciated!

Runescaped commented 7 years ago

Would you mind posting the full command that you're trying to run?

I believe that your issue is simply that you didn't delete a few extraneous characters.

This command works for me: th fast_neural_style.lua -model models/eccv16/starry_night.t7 -input_image images/content/chicago.jpg -output_image out.png

tusheng commented 7 years ago

@Runescaped I run this command: fast_neural_style.lua -model models/eccv16/starry_night.t7 -input_image images/content/chicago.jpg -output_image out.png
but I got the following error: syntax error: [string "fast_neural_style.lua -model models/eccv16/st..."]:1: '=' expected near '-'

my system is macos sierra 10.12.5. I am a newbie and I don't know what's the reason for this error. Is there anyone can help? Thanks a lot!

htoyryla commented 7 years ago

@tusheng perhaps you forgot th at the beginning? Like:

th fast_neural_style.lua -model models/eccv16/starry_night.t7 -input_image images/content/chicago.jpg -output_image out.png
tusheng commented 7 years ago

@htoyryla Thanks! I have solved it. This command run in bash not in torch...