Skip to content

Commit f2f098b

Browse files
committed
Updated autograd comment
1 parent b0f5416 commit f2f098b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/01_penguin_classification.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"\n",
351351
"  The `__init__()` method is where we typically define the attributes of a class. In our case, all the \"sub-components\" of our model should be defined here.\n",
352352
"\n",
353-
"  The `forward` method is called when we use the neural network to make a prediction. Another term for \"making a prediction\" is running the forward pass, because information flows forward from the input through the hidden layers to the output. When we compute parameter updates, we run the backward pass by calling the function `loss.backward()`. During the backward pass, information about parameter changes flows backwards, from the output through the hidden layers to the input.\n",
353+
"  The `forward` method is called when we use the neural network to make a prediction. Another term for \"making a prediction\" is running the forward pass, because information flows forward from the input through the hidden layers to the output. This builds a computational graph. To compute parameter updates, we run the backward pass by calling the function `loss.backward()`. During the backward pass, `autograd` traverses this graph to compute the gradients, which are then used to update the model's parameters.\n",
354354
"\n",
355355
"  The `forward` method is called from the `__call__()` function of `nn.Module`, so that when we run `model(batch)`, the `forward` method is called. \n",
356356
"- First, we will create quite an ugly network to highlight how to make a neural network in PyTorch on a very basic level.\n",
@@ -360,7 +360,7 @@
360360
},
361361
{
362362
"cell_type": "code",
363-
"execution_count": 2,
363+
"execution_count": 14,
364364
"metadata": {},
365365
"outputs": [],
366366
"source": [

0 commit comments

Comments
 (0)