Skip to content

Commit 09fb0f3

Browse files
authored
Merge pull request #1 from tberends/tberends-update-explaination-01
Update 01_pytorch_workflow.ipynb
2 parents 8974543 + 47cc918 commit 09fb0f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

01_pytorch_workflow.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@
880880
">\n",
881881
"> 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",
882882
"> * Calculate the loss (`loss = ...`) *before* performing backpropagation on it (`loss.backward()`).\n",
883-
"> * Zero gradients (`optimizer.zero_grad()`) *before* stepping them (`optimizer.step()`).\n",
883+
"> * Zero gradients (`optimizer.zero_grad()`) *before* computing the gradients of the loss with respect to every model parameter (`loss.backward()`).\n",
884884
"> * Step the optimizer (`optimizer.step()`) *after* performing backpropagation on the loss (`loss.backward()`).\n",
885885
"\n",
886886
"For resources to help understand what's happening behind the scenes with backpropagation and gradient descent, see the extra-curriculum section.\n"

0 commit comments

Comments
 (0)