ganhacks  by soumith

GAN training tips and tricks

created 8 years ago
11,598 stars

Top 4.5% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a curated list of practical techniques and "hacks" for improving the stability and performance of Generative Adversarial Networks (GANs). It targets researchers and practitioners working with GANs who encounter common training difficulties. The benefit is a collection of battle-tested methods to achieve more reliable GAN training.

How It Works

The repository compiles a series of empirical observations and modifications to standard GAN training procedures. These include architectural adjustments like using LeakyReLU and Average Pooling, modified loss functions (e.g., flipping labels for the generator), input normalization, and regularization techniques such as label smoothing and adding noise. The underlying principle is to mitigate common failure modes like vanishing gradients and mode collapse by applying these practical, often non-intuitive, tricks.

Quick Start & Requirements

This repository is a collection of tips and does not contain runnable code. It references external code and papers for implementation details.

Highlighted Details

  • Recommends specific activation functions (LeakyReLU) and downsampling methods (Average Pooling) to avoid sparse gradients.
  • Suggests using Adam optimizer for the generator and potentially SGD for the discriminator.
  • Advocates for label smoothing and adding noise to inputs for improved stability.
  • Mentions using DCGAN architectures or hybrid VAE-GAN/KL-GAN models when possible.

Maintenance & Community

The README notes that the list is no longer actively maintained and its relevance in 2020 is uncertain. Authors include Soumith Chintala, Emily Denton, Martin Arjovsky, and Michael Mathieu.

Licensing & Compatibility

The repository itself does not specify a license. The content is a collection of tips and references to other works, which may have their own licenses.

Limitations & Caveats

The repository explicitly states it is no longer maintained and its relevance is questionable as of 2020. Some tips are marked as "[notsure]", indicating uncertainty about their effectiveness. It does not provide code, requiring users to implement the suggestions themselves.

Health Check
Last commit

3 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
62 stars in the last 90 days

Explore Similar Projects

Starred by Ross Taylor Ross Taylor(Cofounder of General Reasoning; Creator of Papers with Code), Thomas Wolf Thomas Wolf(Cofounder of Hugging Face), and
1 more.

AdversarialNetsPapers by zhangqianhui

0.1%
7k
Paper list for generative adversarial networks (GANs)
created 8 years ago
updated 2 years ago
Feedback? Help us improve.