All models

cyclegan_resnet_6blocks_generator

The CycleGAN generator: a residual image-to-image network that learned to translate without paired examples.

Diffusion and generative · 67 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 (50 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
7.8M
Operations
67
Framework
PyTorch
Recurrent
No
Published
ICCV 2017
Cited by
5,615 (as of 4 October 2026)
Authors
Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros
License
BSD-3-Clause
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
m11760
Graph hash
994fa25172015086fd4cc9909c9cda552013ae31bd3cdf2d0a6e66848af30bcd
Skeleton hash
eaae4f9d1d33e20d1c3e0f66f31135a51b3598afb0895687a14653a6df2ecc4f
Architecture hash
d159ee1660c637230b8c295a453cd5868f759932388aff3783c99413b9881e96
Diagram SHA-256
62a306c97e148040f813aa2d84a97c1f761be9bc599e32a6164d5c317310d82a
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 6-residual-block generator the paper uses for 128 × 128 training images.

About this model's family

CycleGAN is an approach for learning to translate an image from a source domain X to a target domain Y in the absence of paired examples. The goal is a mapping G such that the distribution of images from G(X) is indistinguishable from the distribution Y using an adversarial loss. Because this mapping is highly under-constrained, it is coupled with an inverse mapping F and a cycle consistency loss that pushes F(G(X)) back towards X. Results are shown on collection style transfer, object transfiguration, season transfer and photo enhancement, tasks where paired training data does not exist.

What is traced here is the generator network. Its architecture is adopted from Johnson et al., who had shown impressive results for neural style transfer and super-resolution. The network contains three convolutions, several residual blocks, two fractionally-strided convolutions, and one convolution that maps features to RGB. Like Johnson et al., it uses instance normalization. Each residual block contains two 3 × 3 convolutional layers with the same number of filters on both layers. Reflection padding was used to reduce artifacts. In the paper's notation the 9-block network reads c7s1-64, d128, d256, nine R256 blocks, u128, u64, c7s1-3: a 7 × 7 stem, two stride-2 downsampling convolutions, the residual trunk, two upsampling layers and a 7 × 7 output convolution.

The paper uses 6 residual blocks for 128 × 128 training images and 9 residual blocks for 256 × 256 or higher-resolution training images, and both variants are captured as members. All the models were trained on 256 × 256 images. The official PyTorch repository produces results comparable to or better than the original Torch software, and it ships pretrained CycleGAN generators such as horse2zebra. The pretrained generator is saved as latest_net_G.pth under a checkpoints folder named for the dataset.

Key idea. Unpaired image-to-image translation: an adversarial loss makes G(X) look like Y while a cycle consistency loss with an inverse mapping F pushes F(G(X)) back to X, so the generator can be trained without aligned image pairs.

  • CycleGAN
  • CycleGAN generator
  • ResnetGenerator
  • resnet_9blocks
  • resnet_6blocks
  • cycle-consistent adversarial networks
  • unpaired image-to-image translation
  • horse2zebra
  • style transfer
  • Johnson et al. generator
  • pytorch-CycleGAN-and-pix2pix

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

Cite the paper

@misc{zhu2020unpairedimagetoimagetranslationusing,
      title={Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks}, 
      author={Jun-Yan Zhu and Taesung Park and Phillip Isola and Alexei A. Efros},
      year={2020},
      eprint={1703.10593},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1703.10593}, 
}