Share
Share
Copy Link
In this article
Close
Gradient descent adjusts weights and biases to reduce loss, the score for a wrong guess.
A gradient tells us how the loss changes when a setting moves a little. The learning rate sets the size of our step.
Our network predicts 1 when the target is 2. For this example, each setting has a gradient of −2. Use a learning rate of 0.1.
New value = old value − (learning rate × gradient)
| Setting | Calculation | New value |
|---|---|---|
| Each weight | 1 − (0.1 × −2) | 1.2 |
| Each bias | 0 − (0.1 × −2) | 0.2 |
Give the network 1 again.
- The hidden neuron gets (1 × 1.2) + 0.2 = 1.4.
- The output neuron gets (1.4 × 1.2) + 0.2 = 1.88.
The target is still 2. The squared loss fell from 1 to (1.88 − 2)² = 0.0144.
Exercise
Try a learning rate of 0.2. Does the network get closer to 2 or step past it?
QUOTE:
"Amateurs hack systems, professionals hack people."