small revisions to code examples

This commit is contained in:
Aladdin Persson
2021-03-24 22:03:12 +01:00
parent d945e7ae47
commit 31c404822a
3 changed files with 3 additions and 1 deletions

View File

@@ -130,6 +130,7 @@ for epoch in range(num_epochs):
# gradient descent update step/adam step
optimizer.step()
# Check accuracy on training & test to see how good our model
def check_accuracy(loader, model):
num_correct = 0

View File

@@ -94,6 +94,7 @@ for epoch in range(num_epochs):
# gradient descent or adam step
optimizer.step()
# Check accuracy on training & test to see how good our model
def check_accuracy(loader, model):
num_correct = 0

View File

@@ -95,7 +95,7 @@ for epoch in range(num_epochs):
optimizer.step()
# Check accuracy on training & test to see how good our model
# Check accuracy on training & test to see how good our model is
def check_accuracy(loader, model):
num_correct = 0
num_samples = 0