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