A generative adversarial network (GAN) is a generative model built around competition between two neural networks: a generator creates synthetic samples from random noise, while a discriminator classifies samples as real or fake. section 11.4.1
Training alternates between two opposing objectives:
- The discriminator improves its ability to distinguish training data from generated data. section 11.4.1
- The generator improves its samples by making them harder for the discriminator to identify as fake. section 11.4.1
- At the idealized endpoint, generated samples become difficult to distinguish from real samples, and discriminator accuracy approaches 50 percent. section 11.4.1
GANs can produce highly realistic and diverse outputs, including images and music, but training may be unstable, collapse to limited modes, or provide poorly structured representations. VQGAN addresses these limitations by combining adversarial training with the discrete latent structure of a VQ-VAE. section 11.4 section 11.6
Figure 11.1 Eight steps for building a text-to-image generator from scratch. This chapter focuses on step 7: transforming an image into a sequence of integers using VQGAN. By achieving this, we unlock the ability to generate images sequentially with transformer models, a critical advance that powers state-of-the-art systems such as DALL-E.
Situates VQGAN within a text-to-image pipeline where adversarial generation supports converting images into discrete sequences for transformer-based generation. section 11.0











