Closed smoshie25 closed 1 year ago
Just an easy fix:
filepath = tf.keras.utils.get_file(origin="https://i.imgur.com/gCNcJJI.jpg") image = keras.utils.load_img(filepath) image = np.array(image)
visualization.plot_image_gallery( image.reshape((1,3024, 4032, 3)), value_range=(0, 255), rows=1, cols=1, scale=5, )
Hi,
Thanks for reporting the issue.
The issue has been fixed by the commit here https://github.com/keras-team/keras-io/pull/1478/commits/8d6039241d399db50cff7e9bdf8dff1ab91ff5a5. Could you please verify and close the issue.
The example here is broken Loading Image fails:
`filepath = tf.keras.utils.get_file(origin="https://i.imgur.com/gCNcJJI.jpg") image = keras.utils.load_img(filepath) image = np.array(image)
visualization.plot_image_gallery( [image], value_range=(0, 255), rows=1, cols=1, scale=5, )`
with error: AttributeError: 'list' object has no attribute 'shape'
or this error:
plot_images_gallery()
requires you to batch yournp.array
samples together.