生成对抗网络(GAN)改进与发展
GAN
实现最原始的,基于多层感知器构成的生成器和判别器,组成的生成对抗网络模型(Generative Adversarial)。
参考论文:《Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/gan/gan.py
AC-GAN
实现辅助分类-生成对抗网络(Auxiliary Classifier Generative Adversarial Network)。
参考论文:《Conditional Image Synthesis With Auxiliary Classifier GANs》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/acgan/acgan.py
BiGAN
实现双向生成对抗网络(Bidirectional Generative Adversarial Network)。
参考论文:《Adversarial Feature Learning》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/bigan/bigan.py
BGAN
实现边界搜索生成对抗网络(Boundary-Seeking Generative Adversarial Networks)。
参考论文:《Boundary-Seeking Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/bgan/bgan.py
CC-GAN
实现基于上下文的半监督生成对抗网络(Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks)。
参考论文:《Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/ccgan/ccgan.py
CoGAN
实现耦合生成对抗网络(Coupled generative adversarial networks)。
参考论文:《Coupled Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/cogan/cogan.py
CycleGAN
实现基于循环一致性对抗网络(Cycle-Consistent Adversarial Networks)的不成对的Image-to-Image 翻译。
CycleGAN其实就是一个A→B单向GAN加上一个B→A单向GAN。两个GAN共享两个生成器,然后各自带一个判别器,所以加起来总共有两个判别器和两个生成器。一个单向GAN有两个loss,而CycleGAN加起来总共有四个loss。
参考论文:《Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/cyclegan/cyclegan.py
DCGAN
实现深度卷积生成对抗网络(Deep Convolutional Generative Adversarial Network)。
DCGAN把上述的G和D用了两个卷积神经网络(CNN)。同时对卷积神经网络的结构做了一些改变,以提高样本的质量和收敛的速度,这些改变有:
- 取消所有pooling层。G网络中使用转置卷积(transposed convolutional layer)进行上采样,D网络中用加入stride的卷积代替pooling。
- 在D和G中均使用batch normalization
- 去掉FC层,使网络变为全卷积网络
- G网络中使用ReLU作为激活函数,最后一层使用tanh
- D网络中使用LeakyReLU作为激活函数
参考论文:《Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/dcgan/dcgan.py
DualGAN
实现对偶生成对抗网络(DualGAN),基于无监督的对偶学习进行Image-to-Image翻译。
参考论文:《DualGAN: Unsupervised Dual Learning for Image-to-Image Translation》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/dualgan/dualgan.py
InfoGAN
实现的信息最大化的生成对抗网络(InfoGAN),基于信息最大化生成对抗网络的可解释表示学习。
InfoGAN是一种能够学习disentangled representation的GAN,比如人脸数据集中有各种不同的属性特点,如脸部表情、是否带眼镜、头发的风格眼珠的颜色等等,这些很明显的相关表示, InfoGAN能够在完全无监督信息(是否带眼镜等等)下能够学习出这些disentangled representation,而相对于传统的GAN,只需修改loss来最大化GAN的input的noise和最终输出之间的互信息。
参考论文:《InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/infogan/infogan.py
LSGAN
实现最小均方误差的生成对抗网络(Least Squares Generative Adversarial Networks)。
参考论文:《Least Squares Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/lsgan/lsgan.py
SGAN
实现半监督生成对抗网络(Semi-Supervised Generative Adversarial Network)。
参考论文:《Semi-Supervised Learning with Generative Adversarial Networks》
代码地址:https://github.com/eriklindernoren/Keras-GAN/blob/master/sgan/sgan.py
WGAN
实现 Wasserstein GAN。
WGAN也是一篇经典,WGAN主要从损失函数的角度对GAN做了改进,损失函数改进之后的WGAN即使在全链接层上也能得到很好的表现结果,具体的来说,WGAN对GAN的改进有:
- 判别器最后一层去掉sigmoid
- 生成器和判别器的loss不取log
- 对更新后的权重强制截断到一定范围内,比如[-0.01,0.01],以满足论文中提到的lipschitz连续性条件。
论文中也推荐使用SGD, RMSprop等优化器,不要基于使用动量的优化算法,比如adam。
参考论文:《Wasserstein GAN》
https://github.com/eriklindernoren/Keras-GAN/blob/master/wgan/wgan.py
Conditional GAN
因为原始的GAN过于自由,训练会很容易失去方向,从而导致不稳定又效果差。而Conditional GAN就是在原来的GAN模型中加入一些先验条件,使得GAN变得更加的可控制。具体的来说,我们可以在生成模型G和判别模型D中同时加入条件约束y来引导数据的生成过程。条件可以是任何补充的信息,如类标签,其它模态的数据等。然后这样的做法应用也很多,比如图像标注,利用text生成图片等等。
相关推荐
深度学习 -- 损失函数
深度残差网络(Deep Residual Networks (ResNets))
深度学习 -- 激活函数
神经网络训练 -- 调整学习速率
生成对抗网络(GAN)改进与发展
生成对抗网络(GAN)优点与缺点
生成对抗网络(GAN)的训练
生成对抗网络(GAN)基本原理
生成模型与判别模型