All models

attngan_d_net256

AttnGAN's three per-scale critics, each judging realism and sentence match.

Diffusion and generative · 35 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 (51 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
71.9M
Operations
35
Framework
PyTorch
Recurrent
No
Published
CVPR (arXiv 2017)
Cited by
1,920 (as of 18 October 2026)
Authors
Tao Xu, Pengchuan Zhang, Qiuyuan Huang 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
m3547
Graph hash
d1834f09fcaa75cc09177324566f4f18543cd803c11370368a17e899021c3fe2
Skeleton hash
d199ec394dde9f40c78ec63fea2f32a652ebeb08d8c3f1e98cbed78885d0043b
Architecture hash
7c27817c19a103db0746ae808a74dd6d61d1c1240d63bdb125a1eff920eb433c
Diagram SHA-256
75a7d84e5b58ff2eee42f46c6b00476013a62b7cd22999b7d9c2b77539635f3d
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

D_NET256 is the discriminator for the 256x256 images produced by G2.

About this model's family

These are the per-scale discriminators of AttnGAN, the Attentional Generative Adversarial Network for attention-driven, multi-stage refinement in fine-grained text-to-image generation. AttnGAN's generative network has m generators that take hidden states as input and generate images of small-to-large scales. At the ith stage, the generator Gi has a corresponding discriminator Di, and the three captured here cover the 64x64, 128x128 and 256x256 stages.

Each discriminator returns two judgments: an unconditional loss that decides whether the image is real or fake, and a conditional loss that decides whether the image and the sentence match. This GAN loss jointly approximates conditional and unconditional distributions, and each Di is trained to classify its input as real or fake by minimizing a cross-entropy loss. The sentence condition is the global sentence vector, formed by concatenating the last hidden states of a bi-directional LSTM text encoder. The discriminators are structurally disjoint, so they can be trained in parallel, each focusing on a single image scale.

The full AttnGAN2 architecture stacks two attention models with three generators, which is why there are three discriminators. The paper reports that AttnGAN boosts the best reported inception score by 14.14% on the CUB dataset and 170.25% on COCO. The official code is a PyTorch implementation that lists python 2.7 among its dependencies.

Key idea. Three scale-specific discriminators that each score an image both unconditionally and against the sentence embedding, so the attentional generator is trained at 64, 128 and 256 pixels at once.

  • AttnGAN
  • AttnGAN discriminator
  • D_NET64
  • D_NET128
  • D_NET256
  • attentional GAN
  • text-to-image GAN discriminator
  • Xu
  • Fine-Grained Text to Image Generation

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

Cite the paper

@misc{xu2017attnganfinegrainedtextimage,
      title={AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks}, 
      author={Tao Xu and Pengchuan Zhang and Qiuyuan Huang and Han Zhang and Zhe Gan and Xiaolei Huang and Xiaodong He},
      year={2017},
      eprint={1711.10485},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1711.10485}, 
}