嗨,我想问你一个关于Keras ImageDataGenerator的问题 . 我可以确定将创建多少个增强图像吗?或者如何在增强后找到训练图像集大小 . 在Keras文档中,流函数描述是:“采用numpy数据和标签数组,并生成批量的增广/规范化数据 . 无限循环地产生批量无限批次 . ”但是生成了多少图像?

例如下面的代码生成了多少图像?无穷 ?

from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
from matplotlib import pyplot
import numpy as np

datagen = ImageDataGenerator(
        rotation_range=40,
        width_shift_range=0.2,
        height_shift_range=0.2,
        shear_range=0.2,
        zoom_range=0.2,
        horizontal_flip=True,
        fill_mode='nearest')
img=load_img('cat.1.jpg')
x=img_to_array(img)
x = x.reshape((1,) + x.shape) 
print x.shape
h=datagen.flow(x)