mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-24 18:45:33 +08:00
model serialization code changed
This commit is contained in:
@ -61,4 +61,4 @@ plt.legend()
|
||||
plt.show()
|
||||
|
||||
# Save the Model
|
||||
torch.save(model, 'model.pkl')
|
||||
torch.save(model.state_dict(), 'model.pkl')
|
Reference in New Issue
Block a user