生成式对抗网络
Generative adversarial networks
A generative model G: capture the data distribution(数据分布)
A discriminative model D: estimate the probability that a sample came from the training data rather than G
Adversarial nets
generator's distribution: $ p_{g} $
a prior on input noise variables: \(p_{z}(z)\)
mapping to data space: \(G(z; \theta_{g})\)
multilayer perceptron with parameters \(\theta_{g}\): \(G\)
second multilayer perceptron: \(D(x; \theta_{d})\) (output a single scalar)
the probability that \(x\) came from the data rather than \(p_{g}\): \(D(x)\)
value function: $ V(G, D) $
Train G to minimize: $ \log{(1 - D(G(z)))} $
Figure
G->D: G is poor, D can reject samples with high confidence
D-->G: log(1-D(G(z))) saturates(充满,饱和)
Note left of G: Training G maximize\n log(D(G(z))) rather than\n Minimize log(1-D(G(z)))
G->D: G is not poor, whether D can reject samples
D-->G: G becomes perfect
Flowchart
st=>start: Start
e=>end
op1=>operation: update the discriminator
op2=>operation: update the generator
opm=>operation: m--
opk=>operation: k--
pgz=>inputoutput: noise prior
pdatax=>inputoutput: data generating distribution
noisesam=>inputoutput: minibatch of m noise samples
examples=>inputoutput: minibatch of m examples
cond1=>condition: m>0?
cond2=>condition: k>0?
st->cond2
cond1(yes)->op2->opm->e
cond1(no)->e
cond2(yes)->pgz->noisesam->pdatax->examples->op1(right)->opk(right)->cond2
cond2(no)->cond1
Cycle-Consistent Adversarial Networks
Model
X->Y: G
Note left of X: Dx
Note right of Y: Dy
Y->X: F
$ x \to G(x) \to F(G(x)) \approx x $ and $y \to F(y) \to G(F(y)) \approx y $
Formulation
Adversarial Loss
\(G\) tries to generate images \(G(x)\) that look similar to images from domain \(Y\)
\(D_{Y}\) aims to distinguish between translated samples \(G(x)\) and real samples \(y\)
Cycle Consistency Loss
Full Objective
Conditional Generative Adversarial Nets
cGANs
\(y\) is a kind of auxiliary information