Deep Learning Interview Questions Answers - Generative Adversarial Networks

Avatto > > DATA SCIENTIST > > SHORT QUESTIONS > > Deep Learning Interview Questions Answers > > Generative Adversarial Networks

With the vanilla GAN, we cannot control and modify the images generated by the generator of the GAN. So, we use conditional GAN. With conditional GAN, we can control and modify the images generated by the generator of the GAN.
The Wasserstein distance is also commonly known as the Earth Movers (EM) distance. It is used as the distance measure in the optimal transport problems where we need to move things from one configuration to another.
In GAN, we minimize the JS divergence between the generator distribution and the real data distribution. But the problem with the JS divergence is that it is not applicable when there is no overlap or when the two distributions do not share the same support.
So, to avoid this issue, we can use the Wasserstein GAN which uses the Wasserstein distance instead of JS divergence.
In the GAN, we use sigmoid cross-entropy as the loss function. The problem with the sigmoid cross-entropy loss is that once the fake samples are on the correct side of the decision surface, then gradients tend to vanish even though the fake samples are far away from the true distribution.
To avoid this issue we use the least-squares GAN. In the least-squares GAN, although the fake samples generated by the generator are on the correct side of the decision surface, gradients will not vanish until the fake samples match the true distribution.
The discriminator of DCGAN consists of series of convolutional and batch norm layers with leaky ReLU activations.
First, we take the image and feed the image as an input to the discriminator, then the discriminator performs a series of convolution operation and then classifies whether the image is a fake image generated by the generator or the image is a real image from the training data.