In 2016, Alec Radford et al. proposed a variation of the GAN called the Deep Convolutional GAN (DCGAN). (The link to the full paper is: https://arxiv.org/abs/1511.06434.) They replaced the MLP layers with convolutional layers. They also added batch normalization in both the generator and discriminator networks. We'll implement DCGAN here on a celebrity images dataset. You can download the ZIP file, img_align_celeba.zip, from http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html. We make use of the loader_celebA.py file we made in Chapter 2, Data Access and Distributed Processing for IoT, to unzip and read the images:
- We'll import statements for all of the modules we'll be requiring:
import loaderimport osfrom glob import ...