In WGAN training, the generator loss measures how well generated samples score under the discriminator. It is defined as the negative discriminator score on fake samples: lossG = −D(G(z)). section 9.3.2
The formula follows directly from the opposing training goals:
- The discriminator maximizes the score assigned to generated samples. section 9.3.2
- The generator minimizes the sign-flipped score, so improving D(G(z)) lowers lossG. section 9.3.2
- Only fake samples appear because the generator does not affect D(x), the discriminator score for real data. section 9.3.2
Batch calculation
Generate a batch from random vectors z, evaluate D(G(z)), average those scores, and negate the result to obtain lossG for the generator update. section 9.3.2
