mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Merge pull request #1 from tberends/tberends-update-explaination-01
Update 01_pytorch_workflow.ipynb
This commit is contained in:
1 file changed
+1
-1
@@ -880,7 +880,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"
|
||||
|
||||
Reference in new issue
Block a user