You could use the code from the ImageNet example 3 to store only the best checkpoint.


If you write them to a file, there won’t be any difference. However, if you want to reload a (temporary) checkpoint after some iterations, you could need to perform a deepcopy, as the state_dict stores references to the parameters.