Model Pipeline - Gradient access (.grad)
This pipeline shows how a simple model learns by calculating gradients using PyTorch's .grad attribute. Gradients tell the model how to change its weights to improve predictions.
This pipeline shows how a simple model learns by calculating gradients using PyTorch's .grad attribute. Gradients tell the model how to change its weights to improve predictions.
Loss
10.25 |*
8.00 | *
6.00 | *
4.00 | *
2.56 | *
1.00 | *
0.64 | *
0.16 | *
0.04 | *
----------------
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 10.25 | N/A | Initial loss is high; gradients calculated for first update |
| 2 | 2.56 | N/A | Loss decreased after weight update using gradients |
| 3 | 0.64 | N/A | Loss continues to decrease; gradients guide learning |
| 4 | 0.16 | N/A | Model is learning well; gradients become smaller |
| 5 | 0.04 | N/A | Loss is low; model predictions close to targets |