如何在使用Image augumentation时确定steps_per_epoch,因为它会增加图像数量

问题描述 投票:2回答:1
model.fit_generator(datagen.flow(X_train,y_train,batch_size=32),epochs=10,steps_per_epoch=5000,validation_data=(X_test,y_test))

我的总数据大小为5000,批量大小为32,那么如何确定steps_per_epoch的值

案例1:不使用ImageAugumentation时

cas2 2:使用ImageAugumentation时(Coz数字图像会增加以及如何在steps_per_epoch中包含它)

deep-learning keras
1个回答
5
投票

steps_per_epoch将是训练集中的样本总数(扩充前)除以批量大小。所以 -

steps_per_epoch = 5000 / 32 ~ 156

使用数据扩充不会影响此计算。您还可以在我的fit_generator()视频中获得有关使用此参数以及Training a CNN with Keras的更多信息。 steps_per_epoch报道在4:08左右开始。

© www.soinside.com 2019 - 2024. All rights reserved.