What is the step-by-step training loop inside a single GAN epoch?
for each batch (e.g., Step 1, Step 2, … Step 500) within the epoch:
Train the Discriminator (D):
FREEZE the Generator (G).
Give D a batch of real images (labeled “real”) and a batch of fake images from G (labeled “fake”).
Update D’s weights to get better at classifying.
Train the Generator (G):
FREEZE the Discriminator (D).
Have G produce a new batch of fake images.
Update G’s weights based on how well it fooled the (now-frozen) D.