DeepLearning | GANS
GANModel[^1][^6]
For the simplest case, we need the following:
- Generator
- A generator function that takes input noise and outputs generated images.
- The generator takes the role of a forger and tries to create music/image/speech from random noise. It learns to map from a latent sapce to a paricular data disrtibuion of interest. It generally implements a Devonvolutional Network to do so.
- The discriminator takes the role of the evaluater and tries to distinguish the fake data(created by the Generator) from the real one. It is usually implemented as a Convolutional Network.
- Real images
- A noise vector to pass the generator
Train until the fake image are indistiguishable from the real image.
Example[^3]
Runing Your First GAN[^1]
笔记暂无。
CNN GAN[^2]
根据Kaggle上的演示,本kernel的效果并不好,或许和网络的设计有关系。然而阅读该kernel的目的在于了解GAN网络的整体架构。当然也希望通过后期学习找到效果不佳的原因。
- GAN model: (None,101) -> (None,2)
- Generative model: (None,101) -> (None,32,32,1)
- Discriminative model: (None,32,32,1) -> (None,2)
- Steps
- Build generative model
- Build discriminative model
- Build the stacked GAN model Pre-train the discriminator network using 500 real image and 500 fake image (epochs=1, batch_size=4) and check the accuracy
- Slowly adjust the learning rates to keep the results stable. For each epoch
- Train discriminator on generated images
- And train generator-discriminator stack (freeze the discriminator subnetwork) on input noise to non-generated output class.
在第四步中,先用真、假图片训练D网络;之后假定D网络已能够区分T、F图像,固定权值后联调,目的在于对G网络进行训练,使之能够达到对于任何噪声输入均能输出真实图像的效果。而在下一个epoch中,又希望D网络能够区分假的真实图像和真实图像…如此循环。
AC-GAN | Fashion AC-GAN with Keras[^4]
[AC-GAN](Conditional Image Synthesis with Auxiliary Classifier GANs: https://arxiv.org/pdf/1610.09585.pdf): Auxiliar Classifier GAN.
The main difference between the AC-GAN and a plain GAN, is that to train the AC-GAN we need both training samples, and training labels. These Training labels are fed to the generator, that will generate fake images using both the random noise, and the input label. The discriminator also has to predict the source of the image (i.e. if it is a fake image or not), and in the AC-GAN scenario, it also has to predict the label of the image.
DC-GAN | Generative Adversarial Networks - Demystified![^7]
DC-GAN: Deep Convolutional GAN, based on this paper on DCGAN whi ch is in contrast to but builds on Ian GoodFellow’s paper.
GoodFellow’s paper is the first paper on GAN and implements a dense network both in the generator and the discriminator rather than a CNN.
tl-GAN demo
Generating Fake Images with GAN Algorithm
Adversarial Learning Challenges - Getting Started
[^1]: Running Your First GAN
[^2]: CNN GAN
[^3]: Kaggle-gan
[^4]: Fashion AC-GAN with Keras
[^5]:Introductory guide to Generative Adversarial Networks (GANs) and their promise!
[^6]:Generative Adversarial Networks
[^7]:Generative Adversarial Networks - Demystified!