A discriminator is a neural-network component that receives real training samples and generated samples, then classifies each as real or fake. In a GAN, it improves its classification while the generator learns to fool it; successful generation drives its accuracy toward approximately 50%. section 11.4.1
In VQGAN, the discriminator contributes to perceptual image quality through three linked roles:
- Evaluates reconstructed or generated images against real images from the target distribution. section 11.4.2
- Supplies adversarial pressure that encourages decoded images to appear perceptually realistic, complementing reconstruction and quantization losses. section 11.4.2
- Works with a VQ-VAE generator whose encoder, codebook, and decoder produce images from discrete latent codes. section 11.4.2
Real versus decoded images
During VQGAN training, the discriminator compares an image from the training set with an image decoded from quantized latent codes, learning to distinguish them while adversarial training pushes the reconstruction toward perceptual realism. section 11.4.2
Figure 11.6 VQGAN architecture and training process in which VQGAN combines a VQ-VAE generator with a discriminator in a GAN framework
Trace the VQGAN architecture and training process connecting the VQ-VAE generator, discrete codebook, decoder, and discriminator. section 11.4.2







