我想知道在什么阶段使用CNN?是在训练期间每批或一个纪元完成后使用,还是在所有纪元完成后使用?我对这两个过程如何一起运行感到有些困惑?类似地,在每批或每个时期之后进行梯度更新?
model.fit_generator(
aug.flow(x_train, y_train, batch_size=BATCH_SIZE),
validation_data=(x_test, y_test),
steps_per_epoch=len(x_train) // BATCH_SIZE,
epochs=EPOCHS, verbose=1, callbacks = callbacks)
从fit_generator中可以清楚地看出,图像是逐批加载到内存中的。
Keras is using validation datasets in the end of every epoch (if you didn't change
validation_freq
in thefit
function). Each epoch your model trains on the whole train dataset and later evaluates itself on the validation dataset