背景
我正在看一个热门 YouTube 速成课程 https://youtu.be/tPYj3fFJGjk?t=12950关于机器学习。
At 3:35:50 https://youtu.be/tPYj3fFJGjk?t=12950,他提到该模型可能过度拟合,因此用更少的 epoch 再次拟合。
由于他没有重新实例化模型,这是否相当于用相同的数据拟合模型,从而继续过度训练?
我的问题
假设您已创建模型并准备好数据。
You run:
model.fit(train_images, train_labels, epochs=10)
model.fit(train_images, train_labels, epochs=8)
这相当于运行:
model.fit(train_images, train_labels, epochs=18)
Or:
model.fit(train_images, train_labels, epochs=8)
If 之前拟合的数据被覆盖 https://stackoverflow.com/questions/49841324/what-does-calling-fit-multiple-times-on-the-same-model-do,为什么跑步model.fit
第二次开始时是否与前一个模型的准确性相同?
In multiple https://stackoverflow.com/questions/42666046/loading-a-trained-keras-model-and-continue-training other https://stackoverflow.com/questions/45393429/keras-how-to-save-model-and-continue-training 问题 https://stackoverflow.com/questions/51854463/is-it-possible-to-retrain-a-previously-saved-keras-model关于保存和训练模型,公认的解决方案是加载先前训练的模型,然后运行model.fit
again.
如果这会覆盖预先存在的权重,那么这是否就违背了保存模型的初衷?第一次使用新数据训练模型不是等效的吗?
在多个相似的数据集上训练模型同时保持所有数据的准确性的适当方法是什么?