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.26k stars 481 forks source link

Error when running new doodle code #5

Closed bmaltais closed 8 years ago

bmaltais commented 8 years ago

When running:

bernard@linux-imac:~/Neural-Style-Transfer$ python neural_doodle.py --nlabels 4 --style-image ../in/vg/srcl.jpg --style-mask ../in/vg/srcl-m.png --target-mask ../in/vg/dst-m.png --target-image-prefix ./doodle1

I get:

Using Theano backend.
Using gpu device 0: GeForce GTX 780M (CNMeM is enabled with initial size: 80.0% of memory, cuDNN 5103)
/home/bernard/anaconda2/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
  warnings.warn(warn)
Traceback (most recent call last):
  File "neural_doodle.py", line 12, in <module>
    from keras.applications import vgg16
ImportError: No module named applications

Tried updating conda packages but still getting the error.

bmaltais commented 8 years ago

Fixed it with:

pip uninstall keras pip install git+https://github.com/fchollet/keras.git

titu1994 commented 8 years ago

@bmaltais Ah I probably should have mentioned that it uses the latest keras from master branch, so I'll add that now.