All models

studiogan_sngan_generator

A GAN whose discriminator weights are divided by their largest singular value to keep training stable.

Diffusion and generative · 81 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
SNGAN
Parameters
4.3M
Operations
81
Framework
PyTorch
Recurrent
No
Published
ICLR 2018
Cited by
3,445 (as of 17 October 2026)
Authors
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida
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
m10302
Graph hash
409b65e7981f4130412a3ce417047e9cec7b04d0d368cbe0dd7d0e8fcf635a82
Skeleton hash
b35abd3fe984488c0b0ebad47fc6a0c46d8c40dfc7f16d490df74cbd4270835d
Architecture hash
24c03109152cd511b517cdc01810c1cdb9089a5f396e7baddc011694a82b388f
Diagram SHA-256
77e0df503b63083e70e1eb5730d0e3260bb87b0a22509b5b05d040934b9078b0
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

This row traces the generator alone, the half that produces the model distribution.

About this model's family

SNGAN is the GAN that introduced spectral normalization, a weight normalization technique that stabilizes the training of the discriminator. The motivation is a familiar failure: in high dimensional spaces, the density ratio estimation by the discriminator is often inaccurate and unstable during the training, and generator networks fail to learn the multimodal structure of the target distribution. Worse, once a discriminator perfectly separates real from generated samples, the training of the generator comes to complete stop, because the derivative of the so-produced discriminator with respect to the input turns out to be 0.

The fix is small enough to read off the traced graph. Spectral normalization normalizes the spectral norm of the weight matrix of each discriminator layer so that it satisfies the Lipschitz constraint, dividing the weight by its largest singular value. Computing that value by singular value decomposition at every step would be expensive, so the authors use the power iteration method to estimate it, which costs very small additional computational time relative to the full computational cost of the vanilla GANs. The Lipschitz constant is the only hyper-parameter to be tuned, and the method worked well even without tuning it.

The captured rows come from PyTorch-StudioGAN, whose table lists SNGAN with a ResNetGAN backbone, conditional batch normalization in the generator, a projection discriminator and the hinge loss; one row is the generator alone. On CIFAR10, STL-10 and ILSVRC2012, the paper reports that spectrally normalized GANs generate images of better or equal quality relative to the previous training stabilization techniques.

Key idea. Spectral normalization: each discriminator weight matrix is divided by its spectral norm, estimated cheaply by power iteration, which enforces a Lipschitz constraint and stabilizes GAN training with one hyper-parameter.

  • sngan
  • sn-gan
  • spectral normalization
  • spectrally normalized gan
  • spectral normalization for generative adversarial networks
  • gan
  • image generation
  • cifar10
  • studiogan
  • projection discriminator

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

Cite the paper

@misc{miyato2018spectralnormalizationgenerativeadversarial,
      title={Spectral Normalization for Generative Adversarial Networks}, 
      author={Takeru Miyato and Toshiki Kataoka and Masanori Koyama and Yuichi Yoshida},
      year={2018},
      eprint={1802.05957},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1802.05957}, 
}