This commit is contained in:
Yan Liu 刘燕 authored and GitHub committed 2024-04-14 18:54:46 -06:00
1 parent 0fa794be52
commit 1bd3758a4c
1 file changed
+2 -2
@@ -816,7 +816,7 @@
" loss.backward()\n",
"\n",
" # 5. Step the optimizer (perform gradient descent)\n",
" optimizer.step() # by default how the optimizer changes will acculumate through the loop so... we have to zero them above in step 3 for the next iteration of the loop\n",
" optimizer.step() # by default how the optimizer changes will accumulate through the loop so... we have to zero them above in step 3 for the next iteration of the loop\n",
"\n",
" ### Testing\n",
" model_0.eval() # turns off different settings in the model not needed for evaluation/testing (dropout/batch norm layers)\n",
@@ -2297,4 +2297,4 @@
"outputs": []
}
]
}
}