我正在用 epoch=10 训练我的模型。我再次用 epoch=3 重新训练。又是纪元 5。所以每次我用纪元 = 10, 3, 5 训练模型时。我想结合所有 3 个纪元的历史。例如,让 h1 = model.fit 的历史记录,纪元 = 10,h2 = epoch=3 的 model.fit 历史记录,h3 = epoch=5 的 model.fit 历史记录。
现在在变量 h 中,我想要 h1 + h2 + h3。所有历史记录都将附加到单个变量,以便我可以绘制一些图表。
代码是,
start_time = time.time()
model.fit(x=X_train, y=y_train, batch_size=32, epochs=10, validation_data=(X_val, y_val), callbacks=[tensorboard, checkpoint])
end_time = time.time()
execution_time = (end_time - start_time)
print(f"Elapsed time: {hms_string(execution_time)}")
start_time = time.time()
model.fit(x=X_train, y=y_train, batch_size=32, epochs=3, validation_data=(X_val, y_val), callbacks=[tensorboard, checkpoint])
end_time = time.time()
execution_time = (end_time - start_time)
print(f"Elapsed …
Run Code Online (Sandbox Code Playgroud)