DCGAN – Adding convolution to a GAN

We just learned how effective GANs are and how can they be used to generate images. We know that a GAN has two components generators that generate the image and the discriminator, which acts as a critic to the generated image. As you can see, both of these generators and discriminators are basically feedforward neural networks. Instead of keeping them as feedforward networks, can we use convolutional networks?

In Chapter 6, Demystifying Convolutional Networks, we have seen the effectiveness of convolutional networks for image-based data and how they extract features from images in an unsupervised fashion. Since in GANs we are generating images, it is desirable to use convolutional networks instead of feedforward networks. So, we introduce a new type of GAN called DCGAN. It extends the design of GANs with convents. We basically replace the feedforward network in the generator and discriminator with a Convolutional Neural Network (CNN).

The discriminator uses convolutional layers for classifying the image as a fake or real image, while the generator uses convolutional transpose layers to generate a new image. Now we will go into detail and see how generators and discriminators differ in DCGAN compared to the vanilla GANs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset