Implementation of DCGAN on celeb faces dataset in pytorch.
link to paper here
Dataset used is celeb faces dataset containing 2,02,599 images of celeb faces.
link to dataset here
Generator consists of 5 ConvTranspose layers along with BatchNorm and leaky ReLU layers, with noise z as input and the output image is of 64x64x3 in shape.
here is the image of Generator:-
Discriminator consists of 5 convolutional layers and outputs the probability of being real image, along with LeakyReLU and BatchNorm layers.
here is the image of the Discriminator:-
Used Binary Cross Entropy loss, trained Discriminator for classifying real inputs first and then on fake images seperately and adding up the gradients to subtract from the weights for gradient descent, used SGD with Momentum to train Discriminator. For Generator used Adam optimizer, learning rate for both generator and discriminator training was set to 0.00015.
Refrence used for tricks to achieve stable training of GAN is ganhacks
For tracking running losses as well as to track how well our generator is performing, used TensorboardX for visualization.
images generated during training:-
images generated after training:-
Discriminator Loss:-
Generator Loss:-