After creating a dataset of images using image_dataset_from_directory from keras, how do you get the first image out of the dataset in a numpy format that you can display using pyplot.imshow?
import tensorflow as tf
import matplotlib.pyplot as plt
test_data = tf.keras.preprocessing.image_dataset_from_directory(
"C:\\Users\\Admin\\Downloads\\kagglecatsanddogs_3367a",
validation_split=.1,
subset='validation',
seed=123)
for e in test_data.as_numpy_iterator():
print(e[1:])
