【发布时间】:2021-10-07 04:22:43
【问题描述】:
dataset=tf.keras.preprocessing.image_dataset_from_directory(
"PlantVillage",
shuffle=True,
image_size=(IMAGE_SIZE,IMAGE_SIZE),
batch_size=BATCH_SIZE
)
for image_batch,label_batch in dataset.take(1):
print(image_batch[1])
当我每次执行第二个代码块时,系统正在打印不同的数组。有人可以让我知道原因吗?我认为这是因为第一个块中的 shuffle=True 语句。如果我错了,请纠正我
【问题讨论】:
-
是的,这就是原因。您是否尝试将其设置为 false 并查看它会做什么?
标签: python tensorflow keras deep-learning