Pytorch implementation of conditional Generative Adversarial Networks (cGAN) and conditional Deep Convolutional Generative Adversarial Networks (cDCGAN) for MNIST dataset
Pytorch implementation of conditional Generative Adversarial Networks (cGAN) [1] and conditional Generative Adversarial Networks (cDCGAN) for MNIST [2] and CelebA [3] datasets.
The network architecture (number of layer, layer size and activation function etc.) of this code differs from the paper.
CelebA dataset used gender lable as condition.
If you want to train using cropped CelebA dataset, you have to change isCrop = False to isCrop = True.
you can download
cGAN | cDCGAN |
MNIST | cGAN after 50 epochs | cDCGAN after 20 epochs |
cDCGAN | cDCGAN crop |
CelebA | cDCGAN after 20 epochs | cDCGAN crop after 30 epochs |
cDCGAN | cDCGAN crop |
[1] Mirza, Mehdi, and Simon Osindero. "Conditional generative adversarial nets." arXiv preprint arXiv:1411.1784 (2014).
(Full paper: https://arxiv.org/pdf/1411.1784.pdf)
[2] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998.
[3] Liu, Ziwei, et al. "Deep learning face attributes in the wild." Proceedings of the IEEE International Conference on Computer Vision. 2015.