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'))