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

09.1 TypeError: an integer is required (got type tuple) #87

Open
Franziska-Pixel opened this issue Feb 26, 2021 · 0 comments
Open

09.1 TypeError: an integer is required (got type tuple) #87

Franziska-Pixel opened this issue Feb 26, 2021 · 0 comments

Comments

@Franziska-Pixel
Copy link

Running the following from the "cookbook" gives the result: "TypeError: an integer is required (got type tuple)"

target_size = max(x for x in model.layers[0].input_shape if x)
img = img.resize((target_size, target_size), Image.ANTIALIAS)
imshow(np.asarray(img))

TypeError Traceback (most recent call last)
in
1 target_size = max(x for x in model.layers[0].input_shape if x)
----> 2 img = img.resize((target_size, target_size), Image.ANTIALIAS)
3 imshow(np.asarray(img))

/usr/lib/python3/dist-packages/PIL/Image.py in resize(self, size, resample, box, reducing_gap)
1871 )
1872
-> 1873 return self._new(self.im.resize(size, resample, box))
1874
1875 def reduce(self, factor, box=None):

TypeError: an integer is required (got type tuple)

Is it due to changed dependencies or components that I should have installed?
Thanks for help!

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