mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-23 00:58:10 +08:00
model serialization code changed
This commit is contained in:
@ -79,4 +79,4 @@ for images, labels in test_loader:
|
||||
print('Accuracy of the model on the 10000 test images: %d %%' % (100 * correct / total))
|
||||
|
||||
# Save the Model
|
||||
torch.save(model, 'model.pkl')
|
||||
torch.save(model.state_dict(), 'model.pkl')
|
Reference in New Issue
Block a user