Papers Notes_5_ GAN--Generative Adversarial Nets

这篇博客深入探讨了生成对抗网络(GANs)的原理和训练过程。GAN由一个判别器(D)和一个生成器(G)组成,其中G试图捕捉数据分布,而D则估计样本是否来自训练数据。训练过程中,D和G通过优化价值函数V(D,G)交替进行,初期着重优化G的输出。博客还提到了激活函数的选择以及训练策略,并提供了相关代码和超参数链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Papers Notes_5_ GAN--Generative Adversarial Nets

Adversarial Nets

a discriminative model G + a generative model D
G captures the data distribution
(the generative model generates samples by passing random noise through a multilayer perceptron)
D estimates the probability that a sample came from the training data rather than G
unique solution→
G recovers the training data distribution
D is equal to 1/2 everwhere

to learn the generator’s distribution p g p_g pg over data x x x
define a prior on input noise variable p z ( z ) p_z(z) pz(z)
represent a mapping to data sapce as G ( z ; θ g ) G(z;\theta_g) G(z;θg)
define D ( x ; θ d ) D(x;\theta_d) D(x;θd) outputs a single scalar, the probability that x x x came from the data rather than p g p_g pg

train D D D to maximize the probability of assigning the correct label to both training examples and examples ffrom G G G
simultaneously train G G G to minimize l o g ( 1 − D ( G ( z ) ) ) log(1-D(G(z))) log(1D(G(z)))
value function V ( D , G ) V(D,G) V(D,G):
min ⁡ G max ⁡ D ( D , G ) = E x ∼ p d a t a ( x ) [ l o g D ( x ) ] + E z ∼ p z ( z ) [ l o g ( 1 − D ( G ( z ) ) ) ] \min \limits_G \max \limits_D(D,G)=\mathbb E_{x\sim p_{data}(x)}[logD(x)]+\mathbb E_{z\sim p_z(z)}[log(1-D(G(z)))] GminDmax(D,G)=Expdata(x)[logD(x)]+Ezpz(z)[log(1D(G(z)))]

Training

Early in learning, maximize l o g ( G ( z ) ) log(G(z)) log(G(z)) rather than minimize l o g ( 1 − D ( G ( z ) ) ) log(1-D(G(z))) log(1D(G(z))) provides much more stronger gradients

Optimizing D to completion in the inner loop of training is computationally prohibtive, and on finite datasets would result in overfitting.
Instead, we alternate between k steps of optimizing D and one step of optimizing G

在这里插入图片描述
the generator net used a mixture of rectifier linear activations and sigmoid activations
the discriminator used maxout activations and dropout
use noise as the input to only the bootommost layer of the generator network

References

Generative Adversarial Nets
All code and hyperparameters available at http://www.github.com/goodfeli/adversarial

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值