Theory of Intelligence
DEEP LEARNING•Training Deep Networks•Debugging And Diagnosing Training•4.3 NaNs, Divergence & Loss Spikes

Introduction

When training blows up: the usual causes of NaN losses and divergence, how to find exactly where the numbers go wrong, and a step-by-step debugging checklist for unstable training.

Introduction

The most dramatic training failure is a loss that suddenly becomes nan ("not a number") or inf. Once a single nan appears, it spreads: every weight it touches becomes nan on the next update, and the whole run is ruined. A milder cousin is the loss spike: the loss jumps up sharply, then slowly recovers, wasting training time and sometimes leaving the model worse.

Think of a smoke alarm in a kitchen. The alarm (the nan) tells you something went wrong, but the fire started a little earlier and somewhere specific: a pan left on high heat, a towel too close to the stove. Debugging divergence means finding where and when the numbers first went bad, not just noticing that they did.

Discuss theoretical concepts, mathematical formulas, and architectural foundations.

Supports inline code with `backticks`
No comments yet. Be the first to start the discussion!