该代码是否同时使用Keras API的原始数据和增强数据

时间:2019-01-25 00:59:19

标签: keras

在fit_generator中,训练是否同时使用原始图像和新生成的图像?文档说“ batch_size”似乎说'32'是扩充的图像编号。那原始图像呢?在选配过程中如何使用它们?

 datagen = ImageDataGenerator(
        featurewise_center=True,
        featurewise_std_normalization=True,
        rotation_range=20,
        width_shift_range=0.2,
        height_shift_range=0.2,
        horizontal_flip=True)

    # compute quantities required for featurewise normalization
    # (std, mean, and principal components if ZCA whitening is applied)
    datagen.fit(x_train)

    # fits the model on batches with real-time data augmentation:
    model.fit_generator(datagen.flow(x_train, y_train, batch_size=32),
                        steps_per_epoch=len(x_train) / 32, epochs=epochs)

0 个答案:

没有答案