-
During the training process, is the saved model checkpoint the model trained on the latest epoch or the model with the best evaluation? If it is the latter, what evaluation metric is it based on? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think the last epoch is saved, although you can use early stopping with any available metrics to get a model, which might perform better on a validation data. |
Beta Was this translation helpful? Give feedback.
-
checkpoint_callback = ModelCheckpoint(
filename='best-{epoch}-{pixel_F1Score:.3f}',
monitor='pixel_F1Score',
mode='max'
)
engine = Engine(
max_epochs=400,
callbacks=[checkpoint_callback],
) addition: You can use the ModelCheckpoint from the lightning library to save the checkpoint with the highest validation accuracy. |
Beta Was this translation helpful? Give feedback.
I think the last epoch is saved, although you can use early stopping with any available metrics to get a model, which might perform better on a validation data.