Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added WGAN method and spectral norm #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ In practice, works well:
- Tom White's [Sampling Generative Networks](https://arxiv.org/abs/1609.04468) ref code https://github.com/dribnet/plat has more details


## 4: BatchNorm
## 4.a Batch normalization

- Construct different mini-batches for real and fake, i.e. each mini-batch needs to contain only all real images or all generated images.
- when batchnorm is not an option use instance normalization (for each sample, subtract mean and divide by standard deviation).

![batchmix](images/batchmix.png "BatchMix")

## 4.b Layer normalization
- when batchnorm is not an option use instance normalization (for each sample, subtract mean and divide by standard deviation).
- use spectral normalization on discriminator (https://arxiv.org/abs/1802.05957)

## 5: Avoid Sparse Gradients: ReLU, MaxPool
- the stability of the GAN game suffers if you have sparse gradients
- LeakyReLU = good (in both G and D)
Expand Down Expand Up @@ -110,10 +113,12 @@ while lossG > B:
- adding gaussian noise to every layer of generator (Zhao et. al. EBGAN)
- Improved GANs: OpenAI code also has it (commented out)

## 14: [notsure] Train discriminator more (sometimes)
## 14: Train discriminator more

- especially when you have noise
- hard to find a schedule of number of D iterations vs G iterations
- train discriminator in n times using Wasserstein distance
- also makes losses correlates with sample quality

## 15: [notsure] Batch Discrimination

Expand Down