LearnBenchStart learning →

AI Research Scientist · Deep Network Training Basics

Gradient clipping

Real lesson card · Page 1 of 4

Gradient clipping

Gradient clipping

Gradient clipping caps the norm or magnitude of a model’s gradients before the optimizer applies its update, so a single bad batch can’t push parameters too far.
Example
If a batch’s gradient norm spikes to 50 while the clip threshold is 5, clipping rescales every gradient down so the overall norm becomes exactly 5 before the update happens.

Recall check from the same lesson

Once a model's loss curve has been smoothly decreasing for a long stretch and gradients are well-behaved, keeping gradient clipping enabled provides little additional protection because the clip threshold is rarely triggered.

Sources

· Editorial policy

One sitting · 20–30 minutes

A focused session on your AI Research Scientist interview

LearnBench starts from what you already know — skip what you have, master what you’re missing.

Start now

More Deep Network Training Basics questions