ryankiros / neural-storyteller

A recurrent neural network for generating little stories about images
2.96k stars 539 forks source link

Unexpected keyword 'preserve_range' #7

Closed jonathanort closed 9 years ago

jonathanort commented 9 years ago

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'

jonathanort commented 9 years ago

Solution was to install the bleeding edge version of Theano

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

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

ekg commented 8 years ago

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

jiangqy commented 8 years ago

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

pdaru commented 7 years ago

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 ?

iSuperAI commented 5 years ago

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))

BoMartins commented 5 years ago

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'