diff --git a/tutorials/01-basics/logistic_regression/main.py b/tutorials/01-basics/logistic_regression/main.py index c7eb378b..61a0a097 100644 --- a/tutorials/01-basics/logistic_regression/main.py +++ b/tutorials/01-basics/logistic_regression/main.py @@ -70,7 +70,7 @@ total += labels.size(0) correct += (predicted == labels).sum() - print('Accuracy of the model on the 10000 test images: {} %'.format(100 * correct / total)) + print('Accuracy of the model on the 10000 test images: {} %'.format(100 * correct.item() / total)) # Save the model checkpoint torch.save(model.state_dict(), 'model.ckpt')