A Simple implementation of DC-GANs using PyTorch.
A DC-GAN consists of two neural networks working opposite to each other. As in the case of Game Theory aim is to find a Nash equilbrium where both the networks find a optimal solution to the optimization problem.
This is the basic architecture of Discriminator used in this demo.
This is the basic architecture of Generator used in this demo.
- Used Batch-Norm in both Gen and Disc
- Used Leaky ReLU for Disc and ReLU for Gen
- Used one sided label Smoothning for real images for training Disc
- Used more Fake images to train the Gen (Did not have much effect on Results)
- It is clearly visible that in generation of fake images that the generator is able to generate few features very accurately but fails for a class with multiple orientations as in cifar10 and stl10 cases. Class conditional images can be reproduced using C-GAN (will try out later).
- Also Dropout Layers could be added in the generator and discriminator and also using InstanceNorm instead of BatchNorm as it is found to make average image of all classes with BatchNorm.
- As per my Observation it is found that the official pytorch DC-GAN implementation does not work that well for Cifar10 and Stl10 datasets.