0
plt.figure(figsize=(10, 10))
for images, labels in x_train:
plt.imshow(np.squeeze(images,0))
plt.title('Color map: Magma'+str(labels\[0,0\]))
plt.axis("off")
break


ValueError: cannot select an axis to squeeze out which has size not equal to one

I am trying to generate images which is augmented. After train and test split the data and then applying augmentation.

Amresh
  • 1

1 Answers1

0
from tensorflow.keras.preprocessing.image import ImageDataGenerator

plt.figure(figsize=(10, 10))
for image, labels in x_train:
    plt.imshow(np.squeeze(image,0))
    plt.title('Color map: Magma'+str(labels[0,0]))
    plt.axis("off")
    break

According to TensorFlow, calling an image directory by writing "from tensorflow.keras.preprocessing.image", where I write "images" instead of "image".

Amresh
  • 1