Experiment - Best model saving pattern
Problem:You have trained a PyTorch model for image classification. The training accuracy is high, but you want to save the best model based on validation accuracy during training to avoid losing the best performing model.
Current Metrics:Training accuracy: 95%, Validation accuracy: 80%, but the saved model is always the last epoch model which has validation accuracy 75%.
Issue:The saved model is not the best one because the saving happens only at the end of training, causing loss of the best validation accuracy model.