# Conditional GAN
GANs do not have an encoder, so it is not clear how you can condition the generation on another variable.
Authors propose conditioning on labels. Appending one-hot-encoded label vector to noise vector
$
\min _{G} \max _{D} \mathbb{E}_{x \sim p_{\text {data}}}[\log D(x \mid y)]+\mathbb{E}_{\mathbf{z} \sim p(\mathbf{z})}[\log (1-D(G(\mathbf{z} \mid \boldsymbol{y})))]
$
Discriminator also recieves the label.
![[cgan.jpg]]
## Image to image translation
Conditioning GAN on other images (like edges) to generate relevant images:
![[im2im-gan.jpg]]
---
## References
1. Mirza and Osindero, Conditional Generative Adversarial Nets
2. Isola, Zhu, Zhou, Efros, Image-to-lmage Translation with Conditional Adversarial Networks