22.02.2024 Views

Daniel Voigt Godoy - Deep Learning with PyTorch Step-by-Step A Beginner’s Guide-leanpub

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gradients, we know we need to take a given number of steps: 1.79 (parameter w)

and 2.90 (parameter b), respectively. Let’s set our step size to 0.2 (low-ish). It

means we move 0.36 for w and 0.58 for b.

IMPORTANT: In real life, a learning rate of 0.2 is usually

considered HIGH—but in our very simple linear regression

example, it still qualifies as low-ish.

Where does this movement lead us? As you can see in the plots below (as shown by

the new dots to the right of the original ones), in both cases, the movement took us

closer to the minimum; more so on the right because the curve is steeper.

Figure 0.10 - Using a low-ish learning rate

Step 4 - Update the Parameters | 45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!