mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-27 03:53:47 +08:00
model serialization code changed
This commit is contained in:
@ -81,4 +81,7 @@ for images, labels in test_loader:
|
||||
total += labels.size(0)
|
||||
correct += (predicted == labels).sum()
|
||||
|
||||
print('Accuracy of the network on the 10000 test images: %d %%' % (100 * correct / total))
|
||||
print('Accuracy of the network on the 10000 test images: %d %%' % (100 * correct / total))
|
||||
|
||||
# Save the Model
|
||||
torch.save(net.state_dict(), 'model.pkl')
|
Reference in New Issue
Block a user