Early stop saving best checkpoints
Hi all, do you know how to save the best model? Since pytorchlighting 's earlystop callback will monitor val_loss and if val_loss stop decreasing, it will stop training automaticlly. In this case, the checkpoint of the final model would be the final epoch (the val_loss starts to increase). Can I save epoch 5 or 6 (before val_loss increasing) as the best model?
you can specify
ModelCheckpoint(monitor='val_loss', save_top_k=1, ...)
this will save the best model.