๐Ÿงฎ Layer Normalization Visualizer

BatchNorm normalizes down columns. LayerNorm normalizes across rows. Same matrix, opposite direction.

๐Ÿ“‹ How To Use This Lab
  1. Flip the switch โ†’ BatchNorm normalizes each column (across samples); LayerNorm normalizes each row (across one sample's features).
  2. Press Next Step โ–ถ โ†’ the next row or column highlights, its real mean/std compute, then it normalizes.
  3. Watch which cells move together โ€” that's the entire difference between the two normalizations.
  4. Use Auto Run to normalize every row/column in sequence automatically.
BatchNorm (columns)
LayerNorm (rows)
Data: 4 Samples ร— 5 Features (raw)
๐Ÿงฎ AXISFlip the switch to choose a direction, then press Next Step โ€” I'll normalize one line at a time.
๐Ÿง‘โ€๐Ÿซ PROF. TORCHBatchNorm needs many samples to compute good statistics. LayerNorm only needs ONE โ€” that's why it works for batch size 1.