ap.Abhishek Patel

Search

Search notes, essays, projects, the library and the AI course. Use arrow keys to choose and Enter to open.

Module 31

Deep Generative Models

Move from models that judge to models that create. You train a GAN that forges handwritten digits, a variational autoencoder that learns a smooth map of faces, and you instrument both with TensorBoard so you can tell real progress from noise.

By the end of this module you can

  • explain how a generator and discriminator train against each other, and why GAN losses do not go to zero
  • implement and train a GAN that generates MNIST digits in PyTorch
  • explain the VAE loss, the KL term and the reparameterisation trick with a worked example
  • train a convolutional VAE on CelebA faces and sample and interpolate new faces
  • log losses, image grids, settings and FID to TensorBoard and diagnose mode collapse and posterior collapse

Lessons

3 in this module
  1. 01Generative adversarial networksExplain the generator-versus-discriminator game with real numbers and train a GAN that generates handwritten MNIST digits in PyTorch.40 min
  2. 02Variational autoencodersExplain why plain autoencoders cannot generate, work through the VAE loss and reparameterisation trick by hand, and train a face VAE on CelebA.45 min
  3. 03TensorBoard for generative modelsLog losses, discriminator outputs, image grids, settings and FID to TensorBoard, and read the dashboard to diagnose GAN and VAE training.35 min