ryankiros/neural-storyteller

Unexpected keyword 'preserve_range'

jonathanort opened this issue · 7 comments

Hi, getting this error when ran using the GPU on AWS

Traceback (most recent call last):
File "main.py", line 3, in
generate.story(z, './images/ex1.jpg')
File "/home/ubuntu/neural-storyteller/generate.py", line 39, in story
rawim, im = load_image(image_loc)
File "/home/ubuntu/neural-storyteller/generate.py", line 153, in load_image
im = skimage.transform.resize(im, (256, w*256/h), preserve_range=True)
TypeError: resize() got an unexpected keyword argument 'preserve_range'

Solution was to install the bleeding edge version of Theano

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
ekg commented

For what it's worth, this didn't work for me. Could the problem be in numpy or scipy?

ekg commented

I've updated everything to bleeding-edge Theano and its dependencies, and I still get this issue. I'm going to resolve another way.

I get this issue too. I install scikit-image(https://github.com/scikit-image/scikit-image) and it works for me.

pdaru commented

Hi, I am not able to solve this error. Can someone please post which version is to be installed or is there any other method to tackle this error ?

As a replacement,
im = skimage.transform.resize(im, (256, w256/h), preserve_range=True)
you can do just like this:
im.resize((256, w*256/h))

Had the same problem on Ubuntu 1604 and python 2.7. The following worked for me:
sudo apt-get remove python-skimage
sudo pip2 install 'scikit-image<0.15'