A critic is the scoring network in a Wasserstein GAN. Instead of estimating whether an image is real or fake as a probability, it assigns a realness score on a continuous scale, making the training objective a distance between real and generated distributions. section 9.3.1
Implementing a critic in a DCGAN-style Wasserstein GAN changes several practical details:
- Rename the discriminator model to critic and compile it with Wasserstein loss. section 9.3.2
- Use Wasserstein loss, implemented as the mean of true labels multiplied by predictions. section 9.3.2
- Train the critic on real and generated images, average the two losses, and clip every layer's weights to the clip_value range. section 9.3.2
- Use the same optimizer for the generator and critic because realness scores normalize their differences. section 9.3.2
Training step
A training step evaluates real and generated batches separately, averages their critic losses, then clips each weight array to prevent exploding gradients. section 9.3.2
Compare probabilistic distance with Wasserstein distance, including the earthmover interpretation that accounts for vertical distribution differences. section 9.3.1
