Summary
GANs have been an active area of research and development in recent years, ever since their inception in 2014. This chapter was an exploration of the concepts behind GANs, including the components of GANs, namely, the generator and the discriminator. We discussed the architectures of each of these components and the overall schematic of a GAN model.
Next, we did a deep dive into a particular type of GAN – the DCGAN. With the help of an exercise, we built a DCGAN model from scratch using PyTorch. We used the MNIST dataset to train the model. The generator of the trained DCGAN model successfully generated realistic-looking fake images of handwritten digits after 10 epochs of training.
In the last section of this chapter, we explored another type of GAN, which is used for the task of image-to-image translation – the pix2pix
model. Instead of working on just a pair of images, the pix2pix
GAN model is architectured to generalize any image-to-image translation...