A small model has trained calmly for hundreds of steps. Then one batch produces a gradient spike, and the backward pass returns this gradient for the model's four weights:
Two teammates each propose a clipping rule. Both use the same limit, .
| rule | what it does to |
|---|---|
| A: clip by norm | if , rescale the whole vector: |
| B: clip by value | clamp each entry separately into : entries above become , entries below become , the rest are left alone |
Here is the ordinary length of the vector. Whichever rule is used, its output replaces in the update, and the weights move against it.
What is the angle, in degrees, between the vector that Rule A produces and the vector that Rule B produces?
Round to 1 decimal place. Carry at least four decimals through the intermediate steps.