Introduction
We use .grad to see how much each number in our model changes the result. This helps the model learn better.
When you want to check how the model is learning after one step.
When you want to debug if gradients are being calculated correctly.
When you want to manually update model weights using gradients.
When you want to understand which parts of the model affect the output most.
When you want to implement custom training loops.