Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
correct = 0
total = 0
for images, labels in test_loader:
outputs = model_load_py(images)
_, predicted = torch.max(outputs.data, 1)
total += labels.size(0)
correct += (predicted == labels).sum()
print('Test Accuracy of the model on the {} test images: {}%'.format(total, 100 * correct / total))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.