Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pillow get a float instead of an integer #4

Open
stonebig opened this issue Jan 21, 2017 · 0 comments
Open

pillow get a float instead of an integer #4

stonebig opened this issue Jan 21, 2017 · 0 comments

Comments

@stonebig
Copy link
Contributor

stonebig commented Jan 21, 2017

trying (on Python-3.4 64bit, windows 10):

python chainer-gogh.py -m nin -i cat.png -s style_0.png -o zzz -g -1

I get an error I don't know what to do about:

load model... nin_imagenet.caffemodel
Traceback (most recent call last):
  File "chainer-gogh.py", line 196, in <module>
    img_content,nw,nh = image_resize(args.orig_img, W)
  File "chainer-gogh.py", line 50, in image_resize
    gogh = np.asarray(gogh.resize((new_w,new_h)))[:,:,:3].transpose(2, 0, 1)[::-1].astype(np.float32)
  File "python-3.4.4.amd64\lib\site-packages\PIL\Image.py", line 1554, in resize
    return self.convert('RGBa').resize(size, resample).convert('RGBA')
  File "python-3.4.4.amd64\lib\site-packages\PIL\Image.py", line 1556, in resize
    return self._new(self.im.resize(size, resample))
TypeError: integer argument expected, got float
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant