Improved GANs—Conditional GAN

Learn about an improved version of GANs, the conditional GAN, and how it can be implemented.

We'll cover the following

GANs are powerful systems that can generate realistic samples from the domain of training. Architectures like the vanilla GAN and DCGAN have also been used to generate samples that resemble human faces and even real-world items (from training on CIFAR-10 and so on). However, they miss out on the ability to control the samples we would like to generate.

Architecture

In simple words, we can use a trained generator to generate any number of samples required, yet we cannot control it to generate a specific type of example. Conditional GANsMirza, Mehdi, and Simon Osindero. 2014. “Conditional Generative Adversarial Nets.” ArXiv.org. 2014. https://arxiv.org/abs/1411.1784. (CGANs) are the class of GANs that provide us with precisely the control needed to generate a specific class of examples. Developed by Mirza et al. in 2014, they are some of the earliest enhancements to the original GAN architecture from Goodfellow et al.CGANs work by training the generator model to generate fake samples conditioned on specific characteristics of the output required. The discriminator, on the other hand, needs to do some extra work. It needs to learn not only to differentiate between fake and real but also to mark out samples as fake if the generated sample and its conditioning characteristics do not match.

In their work, conditional adversarial networks, Mirza et al. pointed toward using class labels as additional conditioning input to both generator and discriminator models. We denote the conditioning input as yy and transform the value function for the GAN minimax game as follows:

Get hands-on with 1400+ tech skills courses.