liveBook · Manning

Critic

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A critic is the scoring network in a Wasserstein generative adversarial network that assigns realness scores rather than real-or-fake probabilities.

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

Figure 9.10 The difference between variational distance and Wasserstein distance

Compare probabilistic distance with Wasserstein distance, including the earthmover interpretation that accounts for vertical distribution differences. section 9.3.1

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains scoring, Wasserstein loss, optimizer setup, training updates, and weight clipping, without deriving the distance mathematically.
Examples
Uses a DCGAN-derived notebook trained on extracted MNIST digits, with an optional switch to Fashion-MNIST.
What it assumes
Assumes familiarity with GANs and discriminators while explaining the critic's distinction from probability-based discrimination.
What you can do after
Build it from scratch by adapting a DCGAN with Wasserstein loss, critic scoring, shared optimizers, and clipped weights.
How it connects
Connects the critic to GANs, discriminators, generators, Wasserstein loss, earthmover distance, exploding gradients, and mode collapse.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.