From f1cfe23373fd1240957ef86e2a21b134b52efe45 Mon Sep 17 00:00:00 2001 From: htlee Date: Tue, 20 Oct 2020 21:21:29 +0800 Subject: [PATCH] --- tutorials/01-basics/logistic_regression/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')