early-stopping的使用
待办
https://blog.csdn.net/qq_37430422/article/details/103638681
github对应类导入,直接放在项目更目录下直接导入就行了。
https://github.com/Bjarten/early-stopping-pytorch
这是对应的github地址代码在内
怎么载入最好的模型参数
https://github.com/Bjarten/early-stopping-pytorch/blob/master/MNIST_Early_Stopping_example.ipynb
#load the last checkpoint with the best model
model.load_state_dict(torch.load('checkpoint.pt'))