我使用kerasfit_generator(datagen.flow())
函数来训练我的初始模型,我对它在每个纪元上的图像数量感到困惑。有谁能帮我讲讲它是怎么工作的吗。我的代码在下面。在
我正在使用thiskeras文档。在
from keras.preprocessing.image import ImageDataGenerator
datagen = ImageDataGenerator(rotation_range = 15, horizontal_flip = True)
# Fitting the model with
history = inc_model.fit_generator(datagen.flow(X_train, train_labels, batch_size=10), epochs=20, validation_data = (X_test, test_labels), callbacks=None)
现在我在X_train
中的图片总数是4676张。然而,每次我运行这条历史线,我
为什么它不拍摄我的全部X_train
图像?
另外,如果我把batch_size
从10改为假设15,它开始拍摄更多更少的图像,比如
Epoch 1/20
436/436
谢谢。在
936
和{936 X 10
和{ImageDataGenerator
,它通过对现有实例应用转换来创建额外的训练实例。在相关问题 更多 >
编程相关推荐