singan_wdiscriminator
SinGAN's per-scale patch critic: five conv blocks scoring every 11x11 patch.
Diffusion and generative · 13 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
- 29.2K
- Operations
- 13
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICCV 2019
- Cited by
- 928 (as of 17 October 2026)
- Authors
- Tamar Rott Shaham, Tali Dekel, Tomer Michaeli
- Source
- GitHub: tamarott/SinGAN
- 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
- m9200
- Graph hash
- fba4bdf195a3682ab23291393339b1d56fe32ac4e0ebc353f13d3ee3f94e476f
- Skeleton hash
- ccbedcecaa93b637d26860a2cf45dd34f0b9110b68f690188c658844ba096ea6
- Architecture hash
- d404787d52b9f590e53ab81a2472c3a7e3918cd60637c9596f1436f3a453f9d5
- Diagram SHA-256
- a64a8982093fa344d761720ded7220a8d336e9f5469e273203ab65d93969466b
- 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 SinGAN, the unconditional generative model learned from a single natural image. SinGAN is a pyramid of fully convolutional GANs, each learning the patch distribution at a different scale of the image, and every scale has its own discriminator. The network captured here is one such discriminator, the WDiscriminator class of the official code.
Each generator is coupled with a Markovian discriminator that classifies each overlapping patch of its input as real or fake. Training uses the WGAN-GP loss, which the authors found increases stability, and the final discrimination score is the average over the patch discrimination map. The loss is defined over the whole image rather than random crops, a batch of size 1, which lets the net learn boundary conditions. Its architecture is the same as the convolutional net inside the generator, so its patch size, the net's receptive field, is 11 by 11. That net is 5 conv-blocks of the form Conv(3x3)-BatchNorm-LeakyReLU with 32 kernels per block at the coarsest scale, doubling every 4 scales.
In the code, the head and body blocks pair a convolution with BatchNorm and LeakyReLU at slope 0.2, and the tail is a single convolution to one channel. The small receptive fields and limited capacity of these GANs prevent them from memorizing the single training image. All generators and discriminators share the same receptive field, so they capture structures of decreasing size going up the pyramid.
Key idea. A Markovian patch discriminator trained with WGAN-GP over the whole image, whose 11 by 11 receptive field matches the generator it is paired with.
- SinGAN
- SinGAN discriminator
- WDiscriminator
- SinGAN patch discriminator
- Markovian discriminator
- single image GAN
- Shaham
- WGAN-GP critic
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{shaham2019singanlearninggenerativemodel,
title={SinGAN: Learning a Generative Model from a Single Natural Image},
author={Tamar Rott Shaham and Tali Dekel and Tomer Michaeli},
year={2019},
eprint={1905.01164},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1905.01164},
}