Wasserstein GAN
A Wasserstein GAN is a generative adversarial network that uses a critic and a Wasserstein-based objective to compare generated and real-data distributions.
Learn Generative AI with PyTorch
A GAN variant that uses the Wasserstein distance as its training objective to improve stability and provide a more informative critic score.
- How it is used
- Stabilizes GAN training by replacing binary cross-entropy with Wasserstein distance and adding gradient-based constraint enforcement.
- How deep it goes
- Explains the critic, Lipschitz requirement, interpolation, gradient calculation, and penalty, without deriving the distance mathematically.
- Examples
- Demonstrates conditional face generation with or without eyeglasses using labeled noise, interpolated images, and critic scores.
- What you can do after
- Build a conditional WGAN with gradient penalty for labeled face generation and calculate Wasserstein loss and gradient penalty.
Read how Learn Generative AI with PyTorch explains Wasserstein GAN →
Inside Deep Learning: Math, Algorithms, Models
A GAN variant that uses a Wasserstein-based objective to improve training behavior and stability.
- How it is used
- Reduces mode collapse and improves GAN training behavior when the original adversarial formulation is difficult to train.
- How deep it goes
- Defines discriminator and generator losses and removes the sigmoid, but defers the mathematics deriving the Wasserstein improvement.
- Examples
- Uses the discriminator score D(G(z)) and generator loss −D(G(z)) as the central implementation example.
- What you can do after
- Apply WGAN losses and discriminator-output changes while understanding their role in reducing training failures.
Read how Inside Deep Learning: Math, Algorithms, Models explains Wasserstein GAN →
Related concepts
- Wasserstein distanceuses · Wasserstein distance is a distance between probability distributions defined by the minimum cost of transporting probability mass between them under a specified ground distance.
- generative adversarial networkalternative to · A generative adversarial network is a generative model with a generator and discriminator trained in competition, enabling the generator to produce samples resembling a target dataset or distribution.
- mode collapseaddresses · Mode collapse is a generative-model failure in which outputs concentrate on a narrow range of patterns and fail to represent the diversity of the target distribution.
- discriminatorcontrasts with · A discriminator is the model component of a generative adversarial network that distinguishes real data from data generated by its generator.
- regularizationuses · Regularization is a modeling technique that constrains or penalizes solutions during fitting or optimization to discourage undesirable complexity or behavior and improve generalization or estimation.
- gradient penaltyused by · A gradient penalty is a regularization loss term that penalizes undesirable gradients during model optimization.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

