stargan_v1_discriminator
StarGAN's PatchGAN critic with a domain-label head: real or fake, and which domain.
Diffusion and generative · 15 operations Checked
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
- Parameters
- 44.8M
- Operations
- 15
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2018
- Cited by
- 4,154 (as of 17 October 2026)
- Authors
- Yunjey Choi, Minje Choi, Munyoung Kim and others
- Source
- GitHub: yunjey/stargan
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m10262
- Graph hash
- da6e5df1667a42f040ffda872d02b38e1ddb32e7a30be9f481fa3c1c10a99054
- Skeleton hash
- 24e71ba10ca8d326e4bfc5611c5168cd421cb00b862a11d6f246ebf83a1814c7
- Architecture hash
- 705b76573388235f42f0227f73621c9f70a60d8d745a02eed3fc24b2e3bab053
- Diagram SHA-256
- 6942447e8b17c624ed74f163e22165d37a2a46418f7b4d0a745fe26cba1f9048
- 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 is the discriminator of StarGAN, a single model that performs image-to-image translation across multiple domains instead of training one model per domain pair. The unified design lets StarGAN train on multiple datasets with different domains within one network, and the paper demonstrates it on facial attribute transfer and facial expression synthesis. The captured member is the Discriminator class of the official PyTorch implementation at the 128x128 CelebA setting.
What makes a single discriminator work across domains is an auxiliary classifier: the discriminator produces probability distributions over both sources and domain labels. The source output is a PatchGAN, which classifies whether local image patches are real or fake. The domain output drives a domain classification loss, split into a term on real images that optimizes D and a term on fake images that optimizes G. The adversarial term is the Wasserstein GAN objective with gradient penalty, chosen to stabilize training and improve image quality.
The discriminator uses no normalization, and its layers are 4x4 stride-2 convolutions with Leaky ReLU at a negative slope of 0.01. Its source head is a single 3x3 convolution to one channel. A separate output layer produces the domain-label distribution. Training alternates one generator update after five discriminator updates with a batch size of 16. For CelebA the 178x218 images are cropped to 178x178 and resized to 128x128, the resolution the official code trains at.
Key idea. A PatchGAN discriminator with an auxiliary domain classifier, so one discriminator can judge realism and domain for every target domain at once.
- StarGAN
- StarGAN discriminator
- StarGAN PatchGAN discriminator
- multi-domain image translation
- facial attribute transfer
- CelebA
- RaFD
- Choi
- yunjey stargan
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{choi2018starganunifiedgenerativeadversarial,
title={StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation},
author={Yunjey Choi and Minje Choi and Munyoung Kim and Jung-Woo Ha and Sunghun Kim and Jaegul Choo},
year={2018},
eprint={1711.09020},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1711.09020},
}