ganhacks README

The project's README from github.com/soumith/ganhacks. As one markdown file: README.md.

(this list is no longer maintained, and I am not sure how relevant it is in 2020)

How to Train a GAN? Tips and tricks to make GANs work

While research in Generative Adversarial Networks (GANs) continues to improve the fundamental stability of these models, we use a bunch of tricks to train them and make them stable day to day.

Here are a summary of some of the tricks.

Here's a link to the authors of this document

If you find a trick that is particularly useful in practice, please open a Pull Request to add it to the document. If we find it to be reasonable and verified, we will merge it in.

1. Normalize the inputs

2: A modified loss function

In GAN papers, the loss function to optimize G is min (log 1-D), but in practice folks practically use max log D

In practice, works well:

3: Use a spherical Z

cube

sphere

4: BatchNorm

batchmix

5: Avoid Sparse Gradients: ReLU, MaxPool

6: Use Soft and Noisy Labels

7: DCGAN / Hybrid Models

8: Use stability tricks from RL

9: Use the ADAM Optimizer

10: Track failures early

11: Dont balance loss via statistics (unless you have a good reason to)

For example

while lossD > A:
  train D
while lossG > B:
  train G

12: If you have labels, use them

13: Add noise to inputs, decay over time

14: [notsure] Train discriminator more (sometimes)

15: [notsure] Batch Discrimination

16: Discrete variables in Conditional GANs

17: Use Dropouts in G in both train and test phase

Authors

ganhacks (soumith/ganhacks)

Searching Database…

11.6K ·GitHub
这是什么?这是一份简短的 GAN(生成对抗网络)训练实用技巧速查表,最初是 NIPS 2016 上 'How to Train a GAN?' 专题分享的讲义。
这是一个工具,还是只是一份参考清单?这是一份普通的 Markdown 文档,并非软件,而是一份编号列表,共 17 条技巧,涵盖归一化、损失函数调整、标签平滑和优化器选择等内容,无需运行或安装任何代码。
列表是怎样组织的?这些技巧按 1 到 17 编号,每条都是简短独立的方法,例如批归一化、使用球面 Z、软标签或带噪声标签、DCGAN、Adam 优化器,或尽早追踪失败情况,并附有对应论文的出处。
这份内容还在持续维护吗?没有。README 本身已注明,自最初 2016 年的分享以来就未再更新,作者甚至不确定到 2020 年时这些技巧还有多少参考价值。
它是否推荐某种特定的 GAN 架构作为入门选择?是的,它建议尽可能使用 DCGAN,因为它运行可靠;如果 DCGAN 在你的场景下不稳定,则可以退而使用 KL+GAN 或 VAE+GAN 等混合方案。
它推荐哪种优化器?生成器使用 Adam,判别器可以用 SGD 作为替代组合。
这份列表是谁整理的?由 Soumith Chintala、Emily Denton、Martin Arjovsky 和 Michael Mathieu 整理而成。
Creator
soumith
Size
0.8 MB
Stars
11.6K
Updated
CommitMar 05
Age
9y
Commits · 90 Days