Skip to content

Commit

Permalink
Update 01_pytorch_workflow.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tberends authored Sep 11, 2024
1 parent 09fb0f3 commit 81a7b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/01_pytorch_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
">\n",
"> And on the ordering of things, the above is a good default order but you may see slightly different orders. Some rules of thumb: \n",
"> * Calculate the loss (`loss = ...`) *before* performing backpropagation on it (`loss.backward()`).\n",
"> * Zero gradients (`optimizer.zero_grad()`) *before* stepping them (`optimizer.step()`).\n",
"> * Zero gradients (`optimizer.zero_grad()`) *before* computing the gradients of the loss with respect to every model parameter (`loss.backward()`).\n",
"> * Step the optimizer (`optimizer.step()`) *after* performing backpropagation on the loss (`loss.backward()`).\n",
"\n",
"For resources to help understand what's happening behind the scenes with backpropagation and gradient descent, see the extra-curriculum section.\n"
Expand Down

0 comments on commit 81a7b92

Please sign in to comment.