我正在训练 Keras 模型,保存它们,model.save()
然后加载它们并恢复训练。
我想在每次训练后绘制整个训练历史,但model.fit_generator()
只返回最后一次训练的历史。
我可以保存初始会话的历史并自己更新,但我想知道 Keras 中是否有管理训练历史的标准方法。
history1 = model.fit_generator(my_gen)
plot_history(history1)
model.save('my_model.h5')
# Some days afterwards...
model = load_model('my_model.h5')
history2 = model.fit_generator(my_gen)
# here I would like to reconstruct the full_training history
# including the info from history1 and history2
full_history = ???