lightweight_gan_generator
Light-weight GAN generator with skip-layer excitation for few-shot, single-GPU image synthesis.
Diffusion and generative · 249 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
- 24M
- Operations
- 249
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2021
- Cited by
- 176 (as of 19 October 2026)
- Authors
- Bingchen Liu, Yizhe Zhu, Kunpeng Song, Ahmed Elgammal
- Source
- lightweight-gan 1.2.1
- 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
- m5625
- Graph hash
- 01e820ccef604cab0172bf79f30399f2d885d82f73d09769ce9188b5afe3d1ce
- Skeleton hash
- e9bd44fe4bc0e139dc2bf045e2cc7086244eba4a8152663e824b688d269c7e63
- Architecture hash
- 049b9573ce9ef33b7b2d98eb45587dd05cd635d2cf600fafadd6b5654895d065
- Diagram SHA-256
- e9f2596a3c650d4d4d2a4a465b07e9bbed808c12510eed746f4098111d670014
- 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 generator from lucidrains' lightweight-gan package, a third-party PyTorch implementation of the paper Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis that adds some techniques of its own. The paper's goal is few-shot image synthesis with minimal computing cost: a light-weight GAN that reaches 1024x1024 resolution, converges from scratch in a few hours on a single RTX-2080 GPU, and keeps a consistent performance with fewer than 100 training samples.
The generator's distinctive piece is the Skip-Layer channel-wise Excitation module, SLE, which uses low-resolution activations to rescale the channel responses of a high-resolution feature map. Because SLE multiplies rather than adds, the two feature maps need not share a spatial size, for example 8x8 against 128x128. The paper says this resembles Squeeze-and-Excitation, except that SLE acts between feature maps that are far apart rather than within one. A side effect the authors note is a learned style and content separation: swapping the low-resolution input changes the style of the output while keeping its content.
The lucidrains package adds options beyond the paper, such as linear plus axial attention at chosen resolution layers, and this generator applies that attention at its 32x32 layer. Trained against the paper's self-supervised discriminator, the model is reported to perform best on 10 of 12 few-shot datasets.
Key idea. A skip-layer excitation module and a self-supervised, auto-encoding discriminator let a light-weight GAN train from scratch at 1024x1024 on one GPU in hours with under 100 images.
- lightweight gan
- lightweight-gan generator
- fastgan
- fastgan generator
- skip-layer excitation
- sle
- few-shot image synthesis
- light-weight gan
- gan generator
- lucidrains
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{liu2021fasterstabilizedgantraining,
title={Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis},
author={Bingchen Liu and Yizhe Zhu and Kunpeng Song and Ahmed Elgammal},
year={2021},
eprint={2101.04775},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2101.04775},
}