Implementing BatchNorm, LayerNorm, and GroupNorm from Scratch

jcflynnnn · reddit · 2026-08-01

To better understand the assumptions behind common normalization layers, a developer implemented BatchNorm, LayerNorm, and GroupNorm from scratch, comparing them on a simple 3-layer MLP trained on MNIST.

Key Findings:

The author shared the full code and visualizations, asking the community about practical scenarios where GroupNorm outperforms LayerNorm beyond small-batch vision tasks.

Original post →

More from Research

Research channel →