A generator produces outputs from a representation or random input. In a GAN, it transforms noise into synthetic samples that resemble real data; in a transformer, it converts decoder outputs into probabilities over target-language tokens. section 11.4.1 section 2.1.2
Trace the generator’s role through its surrounding process:
- GAN generator: sample random noise, transform it into synthetic data, and improve it against the discriminator’s real-versus-fake judgments. section 11.4.1
- Transformer generator: receive the decoder output and produce a probability distribution for the next token, enabling one-token-at-a-time generation. section 2.1.2
- VQGAN combines the GAN generator’s realistic image synthesis with VQ-VAE’s discrete latent structure and codebook. section 11.6
Figure 2.4 An encoder–decoder transformer for machine language translation (e.g., German to English)
Use the encoder–decoder diagram to locate the transformer generator as the output head attached to the decoder. section 2.1.2











