Course Study Note

Day 4 — GANs and Pix2Pix

I separated the generator and discriminator objectives, then followed how a conditional GAN becomes an image-to-image translator.

Date
2025-07-10
Course
2025 Generative Models Intensive — From VAE to Stable Diffusion
01GAN Training Structure

Study checkpoint for this day

02Pix2Pix and Conditional Generation

Study checkpoint for this day

A day-level study path generated from the saved course topic order.

Topics from the day

  1. GAN Training Structure

    I traced gradients and labels while alternating the two optimizers.

  2. Pix2Pix and Conditional Generation

    I linked adversarial loss to realism and L1 loss to input preservation.

Generator, generated result, discriminator, and Pix2Pix loss
Pix2Pix adds an input condition and an L1 reconstruction term to the adversarial game.

Alternating two optimizers

I split the minimax objective from Generative Adversarial Nets into discriminator and generator updates. Generated samples are detached for the D update; the G update keeps the gradient path through D without updating D’s parameters.

Reading the loss curves

A small discriminator loss does not mean that generation is good. I need the two curves, generated samples, and diversity together to spot an overpowering discriminator or mode collapse.

Pix2Pix

Pix2Pix conditions both networks on the input image. Its adversarial term rewards realistic local structure, while L1 helps preserve the paired target and U-Net skip connections carry spatial detail.

I did not retain a paired-image output from the course run, so a direct L1-only comparison remains a future rerun.

← Course home
Publication first-page preview