πŸ§— Gradient Clipping Visualizer

A glass ceiling stops exploding gradients from flinging your model into space.

πŸ“‹ How To Use This Lab
  1. Press πŸ”₯ Gradient Spike Generator β†’ watch a huge gradient try to fling the ball off the landscape.
  2. Lower the Clip Threshold slider β†’ the red "glass ceiling" circle shrinks β€” press Spike again and it gets sheared safely.
  3. Flip Show Original Direction β†’ a ghost arrow shows the direction only was preserved, magnitude was capped.
  4. Try β–Ά Auto-Training with the threshold set very low β†’ watch the ball get stuck, unable to climb the hill.
Loss = 1.480
β€–gradβ€– = 0.450
Training
Loss Landscape Gradient Vector + Glass Ceiling Live Gradient Norm Gauge
Clipped Only
Show Original Direction
πŸ§— KLIPPress Next Step for normal training, or hit the Spike button to see what an exploding gradient looks like.
πŸ§‘β€πŸ« PROF. TORCHclip_grad_norm_ rescales the gradient so its norm never exceeds max_norm β€” direction stays identical, only magnitude shrinks.