AI · Deep Learning · Computer Vision · Generative AI
From GANs to Pix2Pix
2026-08-01 · updated 2026-08-01 · Hyeongrok Ryu
Notes connecting alternating generator and discriminator updates with Pix2Pix conditioning and L1 loss.
- Type / level
- study-note · intermediate
- Tools
- Python, PyTorch
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
Two-model game
The generator produces samples while the discriminator distinguishes real from fake. Their different objectives require separate optimizer steps.
Gradient path
I detached generated samples during the discriminator update. The generator update preserved the path through D without changing D’s parameters.
Reading losses
A small discriminator loss alone can be misleading. Generated samples, diversity, and both curves are needed to identify imbalance or mode collapse.
Pix2Pix
Pix2Pix conditions both networks on the input. Adversarial loss rewards realistic structure, L1 preserves the paired target, and U-Net skips carry spatial detail.
Planned comparison
The course output image was not saved. I will compare L1-only with adversarial-plus-L1 on the same paired dataset in a new run.
Sources used
- Generative Adversarial Nets — paper; minimax objective
- Image-to-Image Translation with Conditional Adversarial Networks — paper; Pix2Pix architecture