After setting the monitor to val accuracy, I would like to get the best model out of each epoch, but later on I found out that it is when epoch % save_epoch == 0 that best_model will be saved. This would cause the problem that models, with potentially better validation accuracy, are missed because they do not met condition to be saved, which does not seem to be a good idea.
After setting the monitor to val accuracy, I would like to get the best model out of each epoch, but later on I found out that it is when
epoch % save_epoch == 0
that best_model will be saved. This would cause the problem that models, with potentially better validation accuracy, are missed because they do not met condition to be saved, which does not seem to be a good idea.This is the line that illustrates the problem: https://github.com/victoresque/pytorch-template/blob/f44498693fc4d3b20e412020116eec8c96e36c2e/base/base_trainer.py#L102