GAN Lab
8 min read.
GAN Lab is an interactive playground that trains a Generative Adversarial Network on a 2D point distribution in your browser, letting you watch the generator and discriminator co-evolve in real time. A GAN pairs two networks in a minimax game: the generator maps random noise to synthetic samples while the discriminator tries to tell those fakes from real data — each training step makes one smarter, forcing the other to adapt. Use GAN Lab to change the target distribution (grid, ring, Gaussian mixture), adjust the learning rates and network sizes, and observe how quickly the generated points spread to cover the real distribution. Watch for mode collapse — when the generator fixates on a few clusters — and see how slowing the discriminator or tuning the step ratio can recover diversity.
step 0, m 0.0, s 0.30
Blue bars are real data, centred at 4. Amber bars are the generator's fakes, centred at 0. The curve is the discriminator's guess that a point is real.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Generator or discriminator?
Sort each objective and signal.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Generator
Drop items hereDiscriminator
Drop items hereQuiz
20 questionsA Generative Adversarial Network (GAN) consists of two networks called the…
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.