Skip to content

RaySunWHUT/Generative-adversarial-networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Generative-adversarial-networks

This is a very simple implement of GANs by PyTorch 1.7.1.

This code is modifies, adapts by PyTorch 1.71 based on the GANs implemented in devneg. Moreover, I adds some comments to the original code and personal understandings of some code segments.

Task goal:

The goal of this GANs is to generate a Gaussian normal distribution from a uniform distribution; The task goal can be visualize like this:

img

the network architecture of generator and discriminator:

img

img

Result Show:

The following lists the data distribution results generated by the generator G for every 500 epochs of training.

epochs = 0

img

epochs = 1000

img

epochs = 5000

img

If we visualize the process iteration training, the sample mean and variance of the data distribution generated by the generator can be seen that:

img

After a certain epochs, the samples mean and variance of the generated data converge stably to the initial value we set for the target data distribution.

It means that our GANs trained successfully!

you can see the detailed analysis of the source code in my CSDN blog or Zhihu column.

References:

  1. https://www.cnblogs.com/LXP-Never/p/9706790.html

  2. https://www.cnblogs.com/LXP-Never/p/9706790.html

  3. https://www.cnblogs.com/wupiao/articles/13323283.html

  4. https://docs.python.org/zh-cn/3/tutorial/classes.html

  5. https://www.yht7.com/news/97242

  6. https://zhuanlan.zhihu.com/p/93423829

About

This is a very simple implement of GANs by PyTorch 1.7.1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages