The clip multiplier is the scalar that clip-by-norm applies. Separating it out makes the rule explicit: it is one when the norm is within bounds and shrinks the gradient otherwise.
Implement clip_scale(norm, threshold), the scalar clipping multiplier.
Take the minimum of one and the threshold divided by the norm.
No results yet
Run your code to check it against the examples, or submit to run every test.