Dhar / image-dreamer

"Dreams" images, such as shown in the Google Research blog post on "Inceptionism".
103 stars 42 forks source link

Support for GPU not setup by default #16

Open paulnord opened 7 years ago

paulnord commented 7 years ago

If Caffe was built for the NVIDIA GPU, these lines will speed things up a LOT. Insert this code just after the "import caffe" line.

# If your GPU supports CUDA and Caffe was built with CUDA support,
# uncomment the following to run Caffe operations on the GPU.
caffe.set_mode_gpu()
caffe.set_device(0) # select GPU device if multiple devices exist