GAN: 生成对抗网络

GAN

论文:Generative Adversarial Nets,an J. Goodfellow, Jean Pouget-Abadie∗, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair†, Aaron Courville, Yoshua Bengio‡,2014

$$
\min_G \max_D V(D, G) = \mathbf{E} _ {x \in p_{data}(x)}[\log D(x)] + \mathbf{E} _ {x \in p_{z}(z)}[\log(1-D(G(z)))]
$$

训练算法:

GAN-GLAORITHM

理论结论

$$
V(G,D) = \int_x dx p_{data}(x) \log(D(x)) + p_g(x) \log(1 - D(x))
$$

容易验证,最优的D满足

$$
D^* _ G(x) = \frac{p_{data}(x)}{p_{data}(x) + p_g(x)}
$$

最优 value function为

$$
C(G) = \mathbf{E} _ {x \in p_{data}(x)}[\log \frac{p_{data}(x)}{p_{data}(x) + p_g(x)}] + \mathbf{E} _ {x \in p_{z}(z)}[\log(\frac{p_{g}(x)}{p_{data}(x) + p_g(x)})] \\
= - \log 4 + 2 JSD(p_{data} || p_g)
$$

JSD 是 Jensen–Shannon divergence. 上式最优的结果是 $(-\log4)$,当 $(p_g = p_{data})$ 取得。

DCGAN

生成自然图像

LSUN

图像算术运算

VAE-GAN

UNsupervised Image-to-image Translation Networks

训练技巧2016

CGAN2014

def discriminator(x, y):
    inputs = tf.concat(axis=1, values=[x, y])
    D_h1 = tf.nn.relu(tf.matmul(inputs, D_W1) + D_b1)
    D_logit = tf.matmul(D_h1, D_W2) + D_b2
    D_prob = tf.nn.sigmoid(D_logit)

    return D_prob, D_logit

def generator(z, y):
    inputs = tf.concat(axis=1, values=[z, y])
    G_h1 = tf.nn.relu(tf.matmul(inputs, G_W1) + G_b1)
    G_log_prob = tf.matmul(G_h1, G_W2) + G_b2
    G_prob = tf.nn.sigmoid(G_log_prob)

    return G_prob

Image-to-image translation with conditional adversarial nets(pix2pix)

pix2pix01

GAN单图像超分辨 SRGAN

SISR-GAN

Hing loss

参考