File size: 1,189 Bytes
16329a2
 
 
 
 
 
722506e
 
 
 
 
4c6e522
16329a2
4c6e522
16329a2
4c6e522
16329a2
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
library_name: keras
tags:
- GAN
---

## Generative Adversarial Network

This repo contains the model and the notebook to this [this Keras example on WGAN](https://keras.io/examples/generative/wgan_gp/).
Full credits to: [A_K_Nain](https://twitter.com/A_K_Nain)

## Wasserstein GAN (WGAN) with Gradient Penalty (GP)

The original Wasserstein GAN leverages the Wasserstein distance to produce a value function that has better theoretical properties than the value function used in the original GAN paper. WGAN requires that the discriminator (aka the critic) lie within the space of 1-Lipschitz functions. The authors proposed the idea of weight clipping to achieve this constraint. Though weight clipping works, it can be a problematic way to enforce 1-Lipschitz constraint and can cause undesirable behavior, e.g. a very deep WGAN discriminator (critic) often fails to converge.

The WGAN-GP method proposes an alternative to weight clipping to ensure smooth training. Instead of clipping the weights, the authors proposed a "gradient penalty" by adding a loss term that keeps the L2 norm of the discriminator gradients close to 1.
## Intended uses & limitations


<details>
</details>