A GAN pits two networks against each other: a generator G that maps latent noise z to fake samples G(z), and a discriminator D that tries to tell real samples x apart from fakes. Training is a minimax game:
min_G max_D V(D,G) = E[log D(x)] + E[log(1 − D(G(z)))]
x~p_data z~p_z
Here the cyan cloud is a stand-in for the real-data manifold pdata. The red-to-green points are generated samples G(z); every frame each one takes a small step (scaled by the learning rate) toward its assigned target on the manifold, exactly like a generator improving from the gradient of D's feedback. Point colour doubles as an implicit discriminator score — red means D can still easily flag the sample as fake, green means it now looks real.
- Generator learning rate — the fraction of the remaining distance to the target each step covers; too high causes oscillation, too low means slow convergence, just like a real optimizer's step size.
- Latent diversity — how many distinct manifold points the generator's outputs are allowed to target. Dragging it near 0 forces most of the batch onto a handful of modes — the classic GAN failure called mode collapse.
- Batch size — how many latent samples z are drawn and generated per step.
Generator loss is the mean distance from generated points to their targets (it should fall as training proceeds); discriminator accuracy estimates how easily D still separates real from fake — at a true Nash equilibrium it settles near 50%, meaning D can no longer do better than a coin flip.