Skip to content

Commit 2ab445a

Browse files
authored
Merge pull request #43 from NadimKawwa/patch-3
Code optimization
2 parents ae5248a + 317203c commit 2ab445a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intro-to-pytorch/Part 5 - Inference and Validation (Solution).ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@
426426
" test_losses.append(test_loss/len(testloader))\n",
427427
"\n",
428428
" print(\"Epoch: {}/{}.. \".format(e+1, epochs),\n",
429-
" \"Training Loss: {:.3f}.. \".format(running_loss/len(trainloader)),\n",
430-
" \"Test Loss: {:.3f}.. \".format(test_loss/len(testloader)),\n",
429+
" \"Training Loss: {:.3f}.. \".format(train_losses[-1]),\n",
430+
" \"Test Loss: {:.3f}.. \".format(test_losses[-1]),\n",
431431
" \"Test Accuracy: {:.3f}\".format(accuracy/len(testloader)))"
432432
]
433433
},

0 commit comments

Comments
 (0)