All models

monai.PatchDiscriminator

MONAI's PatchGAN discriminator block, a strided conv stack from the pix2pixHD design.

Diffusion and generative · 16 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 (29 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
patchgan
Parameters
44.4K
Operations
16
Framework
PyTorch
Recurrent
No
Published
CVPR (arXiv 2017)
Cited by
4,495 (as of 9 October 2026)
Authors
Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu and others
License
Apache-2.0
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
m7438
Graph hash
c1dd6811a5538e116a5fd3b3a21a4c75dcec4386a44ca35d41e64bbd3d1dadbb
Skeleton hash
94695a56a4e046f4ac422c45ea73164ade32fcee8f963105393ae9e0aa1604a5
Architecture hash
f77ef54fb0c7023265209e523585e9faf90778d10aa8a28da99317cf1fb2218d
Diagram SHA-256
d125aeb66641ee2e12ef7fe6f17308c768df692c7fddc37ad72bef60c93df01b
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

monai.networks.nets.PatchDiscriminator(spatial_dims=2, channels=8, in_channels=1, out_channels=1, num_layers_d=3)

What it is

About this model's family

This is MONAI's Patch-GAN discriminator, based on pix2pixHD, the paper High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs. That paper is about synthesizing high-resolution photo-realistic images from semantic label maps using conditional GANs. Its 2048x1024 results rest on a novel adversarial loss plus new multi-scale generator and discriminator architectures.

The MONAI block stacks num_layers_d convolution layers, each Conv plus activation plus normalisation with optional dropout. Filters start at the channels argument and double for each subsequent layer. Defaults are LeakyReLU activation, batch norm, and no bias in the convolution blocks. Two configurations are traced: a pix2pix-style one with 64 starting filters on a 6-channel 256 × 256 input standing in for a concatenated label and image pair, and a small one with 8 filters on a single-channel 64 × 64 input.

Key idea. A patch-based convolutional discriminator block, parameterised by depth and starting filter count, taken from the pix2pixHD discriminator design.

  • patchgan
  • patch discriminator
  • pix2pix discriminator
  • pix2pixhd
  • monai patchdiscriminator
  • conditional gan discriminator
  • patch-gan

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

Cite the paper

@misc{wang2018highresolutionimagesynthesissemantic,
      title={High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs}, 
      author={Ting-Chun Wang and Ming-Yu Liu and Jun-Yan Zhu and Andrew Tao and Jan Kautz and Bryan Catanzaro},
      year={2018},
      eprint={1711.11585},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1711.11585}, 
}