保存模型:
torch.save(model, 'model.pth')
加载模型:
model = torch.load('model.pth')
Original: https://www.cnblogs.com/geeksongs/p/15861323.html
Author: Geeksongs
Title: Pytorch模型保存和加载
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/576915/
转载文章受原作者版权保护。转载请注明原作者出处!