我想看看我的 ImageDataGenerator 为我的网络带来了什么。
Edit:
删除了channel_shift_range,不小心将其留在了代码中
发电机
genNorm = ImageDataGenerator(rotation_range=10, width_shift_range=0.1,
height_shift_range=0.1, zoom_range=0.1, horizontal_flip=True)
获取批次
batches = genNorm.flow_from_directory(path+'train', target_size=(224,224),
class_mode='categorical', batch_size=64)
x_batch, y_batch = next(batches)
绘图图像
for i in range (0,32):
image = x_batch[i]
plt.imshow(image.transpose(2,1,0))
plt.show()
Result
发电机输出 https://i.stack.imgur.com/zufrN.png
这是正常现象还是我在这里做错了什么?