Deconstructing GANs from Scratch
Explore the mathematics of adversarial training, minimax games, and generative modeling — built entirely from scratch in pure PyTorch.
Part 1
The Math of Adversarial Training
Breaking down the minimax game, Jensen-Shannon divergence, the optimal discriminator proof, and Nash equilibrium dynamics.
Part 2
PyTorch Implementation
Building a Vanilla GAN and DCGAN with ConvTranspose2d generators and Conv2d discriminators — entirely from scratch.
View Code on GitHub
Part 3
Watching Noise Become Digits
Analyzing training dynamics, generator vs discriminator loss equilibrium, and the dramatic quality improvement from convolutional inductive bias.