ProGamerGov / neural-style-pt

PyTorch implementation of neural style transfer algorithm
MIT License
834 stars 178 forks source link

Where to run the scripts? #12

Closed apinanaivot closed 4 years ago

apinanaivot commented 5 years ago

Sorry for noob question, the usage guide seems to assume that the user knows how to use Python. I have managed to install Python 3.7, Anaconda and Pytorch but I'm stuck at running "python models/download_models.py" because I don't know where to run it. If I run it in Python 3.7 I get a syntax error, and running it in Anaconda gives this error:

(base) C:\Users\User>python models/download_models.py python: can't open file 'models/download_models.py': [Errno 2] No such file or directory

Also I don't understand the usage part, it just tells you that this is how you use it:

python neural_style.py -style_image -content_image

Where do you type this line?

Thanks

ProGamerGov commented 5 years ago

@apinanaivot If you are using Python 3, you run the scripts via python3 models/download_models.py, and not python models/download_models.py.

(base) C:\Users\User>python models/download_models.py

Also, make sure that you are in the proper directory for neural-style-pt, it should be something like neural-style-pt\models\download_models.py (plus the rest of the path if you aren't using a relative directory) if you are using Windows. Flip the slashes around if you are using Linux.

ProGamerGov commented 4 years ago

You have to cd into the neural-style-pt directory to run the scripts first:

cd ~ 

cd neural-style-pt