An open API service indexing awesome lists of open source software.

https://github.com/hwalsuklee/tensorflow-gan-1d-gaussian-ex

Tensorflow implementation of Generative Adversarial Network for approximating a 1D Gaussian distribution
https://github.com/hwalsuklee/tensorflow-gan-1d-gaussian-ex

1d-gaussian gan generative-adversarial-networks tensorflow tutorial

Last synced: 6 months ago
JSON representation

Tensorflow implementation of Generative Adversarial Network for approximating a 1D Gaussian distribution

Awesome Lists containing this project

README

          

# Generative Adversarial Network for approximating a 1D Gaussian distribution
Tensorflow implementation of Generative Adversarial Network for approximating a 1D Gaussian distribution.

## Results

Desirable result of GAN is to have decision boundary (db) of one-half and probability distribution function (pdf) of generated data similar to the original pdf.

Through the following images, you can see that all of results for various 1D Gaussian distributions are well shaped.

On the other hand, code in two references does not give stable results when changing mean, sigma, or seed.  
Please check it out for yourself.

mean = -1
mean = +1

stdev = 0.7

stdev = 1.0

stdev = 2.0

## References

The implementation is based on the projects:

[1] Project by Eric Jang : [BLOG](http://blog.evjang.com/2016/06/generative-adversarial-nets-in.html), [CODE](https://github.com/ericjang/genadv_tutorial)
[2] Project by John Glober : [BLOG](http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/), [CODE](https://github.com/AYLIEN/gan-intro)

## Implementation Details
### Network architecture
Fully-connected neural network with 1 hidden layer.

Generator
Discriminator

Input layer
1 node
1 node

Hidden layer
32 nodes + relu
32 nodes + relu

Output layer
1 node
1 node + sigmoid

### Pre-training
Discriminator is pre-trained with pdf of the orginal data in both two references.
In real situation, we don't know about the pdf of the original data. Actually, that is what we want know.
*Estimated* pdf of the original data is used to pre-train discriminator in this implementation.

## Acknowledgements
This implementation has been tested with Tensorflow r0.12 on Windows 10 and Ubuntu 14.04.