我正在使用ImageDataGenerator和flow_from_dataframe加载数据集
使用flow_from_dataframe
和shuffle=True
对数据集中的图像进行洗牌
我想洗牌。如果我有12个图像和batch_size=3
,那么我有4个批次:
batch1 = [image1, image2, image3]
batch2 = [image4, image5, image6]
batch3 = [image7, image8, image9]
batch4 = [image10, image11, image12]
我希望在不洗牌每个批次中的图像的情况下洗牌批次,以便获得例如:
batch2 = [image4, image5, image6]
batch1 = [image1, image2, image3]
batch4 = [image10, image11, image12]
batch3 = [image7, image8, image9]
使用ImageDataGenerator和来自数据帧的流可以吗?我可以使用预处理功能吗
考虑使用^{} API。您可以在洗牌之前执行批处理操作
然后,可以使用映射操作从文件名加载图像:
相关问题 更多 >
编程相关推荐