Clipping a Gradient by Its Norm

Calculus in Deep LearningEasy+10 XP+10

Clipping a Gradient by Its Norm

A model with two parameters produces the gradient

∇L=(9,  12)\nabla L = (9,\; 12)∇L=(9,12)

on this batch. The optimizer uses clipping by norm with threshold c=3c = 3c=3: if ∥∇L∥>c\lVert \nabla L \rVert > c∥∇L∥>c the gradient is replaced by

c∥∇L∥ ∇L\frac{c}{\lVert \nabla L \rVert}\,\nabla L∥∇L∥c​∇L

and otherwise it is passed through untouched.

Which gradient does the optimizer actually use for this update?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.