last.pt and best.pt have the same epoch='-1' and the same best_fitness

In my expriment, the epochs in best and last are not same
@xiaoxuebajie checkpointing operates correctly.
There is no constraint that best and last must be different.
@glenn-jocher I mean the epoch in the best.pt and last.pt are always '-1'.
@xiaoxuebajie yes, this is a final step performed after stripping the optimizer from the checkpoint at the end of a successful training.
https://github.com/ultralytics/yolov5/blob/b8f656742db6dd9f22ece7461014b43bfdcf386a/utils/general.py#L673-L685
This allows this model to be used pretrained weights for further trainings, the same as the official COCO-trained models we make available.
@glenn-jocher Hi, thanks for your great work. Are there any ways to "undo" this process? In my case, I want to continue training my stripped last.pt because I think it still has the potential to converge more. Thanks
@tailtq no this can not be undone. The cosine LR scheduler is planned for the exact number of epochs you specify, you can not continue it once complete as the LR is basically at zero.
@glenn-jocher Thanks, I continued my training with the previous experiment.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@tailtq no this can not be undone. The cosine LR scheduler is planned for the exact number of epochs you specify, you can not continue it once complete as the LR is basically at zero.