A deep convolutional generative adversarial network (DCGAN) generates images through two competing networks: a generator creates images from latent-space noise, while a discriminator predicts whether images are real or generated. Training repeatedly exposes the discriminator to both groups, improving its judgments and pushing the generator toward realistic outputs. section 1.2.2 section 4.5
A DCGAN combines the following model components:
- Build the discriminator with 2D convolutional layers that extract spatial features, followed by batch normalization, LeakyReLU activations, a sigmoid output, and flattening. section 4.5.1
- Build the generator with 2D transposed convolutional layers that mirror the discriminator, expanding a 100-value latent noise vector into a three-channel RGB image. section 4.5.1
- Use LeakyReLU in the discriminator to retain a small negative slope, helping neurons remain active and supporting gradient flow during training. section 4.5.1
Generating anime faces
Train on 63,632 colorful anime-face images. Sample a different latent vector Z for each generation, produce fake faces, and present them alongside training images to the discriminator. Early outputs resemble static; after repeated training iterations, the generator produces novel anime-face images. Changing Z changes the generated result, while later manipulation can target characteristics such as male or female features. section 1.2.2

