All models

erik_wgan_gp

The WGAN-GP generator from PyTorch-GAN: Wasserstein training with a gradient penalty instead of clipping.

Diffusion and generative · 14 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (18 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
wgan-gp
Parameters
1.5M
Operations
14
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2017
Cited by
6,799 (as of 17 October 2026)
Authors
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m4692
Graph hash
ca1a843d95fa3de9b87ba17a0065ed7c35108875141981fb11564678e4941959
Skeleton hash
1b4227610366198957d3d284e64f343713657d9215b232abf86cade466d3a422
Architecture hash
a2fd721b2a6b0b9d489f25affea32e73d4da5726ef28189d2529c01abaa5d7e8
Diagram SHA-256
60e1dd8fe9da9ac9d6d8765bd9bc186a00db130f87089c3a318488b3a1875175
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

WGAN-GP keeps the Wasserstein GAN's critic but enforces its Lipschitz constraint by penalising the norm of the critic's gradient instead of clipping its weights. The motivation is that the original WGAN sometimes still generates only low-quality samples or fails to converge. The authors trace those failures to weight clipping, which can lead to undesired behavior.

The penalty is applied at points sampled uniformly along straight lines between pairs of real and generated samples, where the optimal critic is known to have unit gradient norm. Every experiment in the paper uses a penalty coefficient of 10. The penalty is two-sided, pushing the gradient norm towards 1 rather than merely keeping it below 1. One consequence is that batch normalization is dropped from the critic, and the authors recommend layer normalization as a drop-in replacement. With this change the authors report stable training of a wide variety of architectures with almost no hyperparameter tuning, including 101-layer ResNets and language models over discrete data.

The authors' own release lists TensorFlow among its prerequisites. Both captured members come from the PyTorch-GAN collection, whose author warns that its architectures will not always mirror the ones proposed in the papers.

Key idea. A gradient penalty on the critic that replaces WGAN's weight clipping and enables stable training of a wide variety of GAN architectures with almost no hyperparameter tuning.

  • WGAN-GP
  • Wasserstein GAN gradient penalty
  • Improved Training of Wasserstein GANs
  • gradient penalty
  • WGAN
  • critic
  • GAN
  • image generation
  • PyTorch-GAN

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{gulrajani2017improvedtrainingwassersteingans,
      title={Improved Training of Wasserstein GANs}, 
      author={Ishaan Gulrajani and Faruk Ahmed and Martin Arjovsky and Vincent Dumoulin and Aaron Courville},
      year={2017},
      eprint={1704.00028},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1704.00028}, 
}