Implement global gradient-norm clipping over a list of tensors

Optimization & Training Dynamics3 / 5

Chapter 073 / 5

Optimization & Training Dynamics

Implement global gradient-norm clipping over a list of tensors

Medium
Target interface
clip_grad_norm(grads, max_norm)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.