titu1994 / Neural-Style-Transfer

Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras 2.0+
Apache License 2.0
2.28k stars 482 forks source link

Run with GPU #56

Open tejasa97 opened 5 years ago

tejasa97 commented 5 years ago

How does one run this code with GPU?

ashnakapoor07 commented 5 years ago

Can I take this up as my first issue?

tejasa97 commented 5 years ago

@ashnakapoor07 Correct me if I'm mistaken, but I'm not sure anybody requires permission. Knock yourself out!

titu1994 commented 5 years ago

If you have CUDA setup with Tensorflow / Theano, the scripts should automatically use the GPU.

If you do not have a local GPU, the colab link in the readme points to a GPU enabled notebook which you can use the script from, just run the cells one by one, select the content and style image and the options and there you go.

Also, @ashnakapoor07 Theres no need to request permission to resolve an issue. Go right ahead.

f1am3d commented 5 years ago

@tejasa97

  1. Check tensorflow-gpu version that this project is using.
  2. Check CUDA compatibility with tensorflow-gpu version.
  3. Install needed CUDA version.
  4. Check system paths variables for CUDA installation.
  5. Install CUDA-compatible cuDNN version.
  6. Reboot your PC.
  7. Run from tensorflow.python.client import device_lib print(device_lib.list_local_devices())