πŸͺ£ Gradient Accumulation Visualizer

Every weight has a bucket underneath it. Backward passes fill it. Only zero_grad() empties it.

πŸ“‹ How To Use This Lab
  1. Next Step β–Ά β†’ runs one backward pass β€” a gradient droplet falls into each weight's bucket.
  2. ⚑ optimizer.step() β†’ updates every weight using its bucket's current total β€” the bucket stays full!
  3. 🧹 zero_grad() β†’ the only action that actually empties the buckets back to zero.
  4. β†Ί Reset β†’ clears everything back to batch 0 with fresh starting weights.
Buckett
πŸ€– BUCKETTPress Next Step to run a backward pass β€” watch a gradient droplet land in every bucket.
πŸ§‘β€πŸ« PROF. TORCHGradients accumulate by default in PyTorch. Forgetting zero_grad() is one of the most common real training bugs.