All models

dmgan_d_net256

DM-GAN's 256-pixel discriminator, giving an unconditional and a text-conditioned real-or-fake score.

Diffusion and generative · 72 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 (49 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

Parameters
18.3M
Operations
72
Framework
PyTorch
Recurrent
No
Published
CVPR 2019
Cited by
605 (as of 17 October 2026)
Authors
Minfeng Zhu, Pingbo Pan, Wei Chen, Yi Yang
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
m4352
Graph hash
d2a9bde6cbbd35cd6d12650b5e6902472fcb2e7446e28d0d389984cea2691648
Skeleton hash
28d789b2282117125deac34df324ecc1022cf8d69f9fcb64e1ae6bdc67c4853a
Architecture hash
36658eb4902500f334ea50ef410209ff6da88df03acda2cfab7e74eb3858e6ce
Diagram SHA-256
1f08df8f59819c2dd1b56a7cf851e6d70fa1adcfc77c82ffaa40b38e54c802f7
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 256-pixel discriminator of DM-GAN, a text-to-image model whose generator first produces a rough initial image and then refines it with a dynamic memory module. The generator side runs in stages, and the paper shows initial 64 by 64 images, images after one refinement and images after two refinements at 128 by 128 and 256 by 256. Each stage has its own discriminator, and the one captured here judges the final 256 by 256 output.

Each discriminator is trained with two terms: an unconditional loss that pushes the generated image to look real, and a conditional loss that makes the image match the input sentence. That is why the traced graph has two outputs: an unconditional real-or-fake logit from the image alone and a conditional logit from the image together with the sentence feature. For all discriminator networks the authors apply spectral normalization after every convolution to avoid unusual gradients. The sentence feature fed to the conditional branch has 256 dimensions by default.

The paper reports that adding discriminators at even lower resolutions such as 16 by 16 or 32 by 32 did not further improve performance, because those low-resolution images are not well generated and their features look like random vectors. DM-GAN was evaluated on the Caltech-UCSD Birds 200 and Microsoft Common Objects in Context datasets with Inception Score, Fréchet Inception Distance and R-precision. The code is the authors' PyTorch implementation of the CVPR 2019 paper.

Key idea. DM-GAN's stage discriminators score an image both unconditionally and conditioned on the sentence embedding, with spectral normalization after every convolution, so the generator is pushed toward images that are both realistic and faithful to the text.

  • DM-GAN
  • DM-GAN discriminator
  • D_NET256
  • dynamic memory GAN
  • text-to-image
  • conditional discriminator
  • CUB birds
  • COCO
  • Zhu

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

Cite the paper

@misc{zhu2019dmgandynamicmemorygenerative,
      title={DM-GAN: Dynamic Memory Generative Adversarial Networks for Text-to-Image Synthesis}, 
      author={Minfeng Zhu and Pingbo Pan and Wei Chen and Yi Yang},
      year={2019},
      eprint={1904.01310},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1904.01310}, 
}