Pytorch implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Networks (DCGAN) for MNIST and CelebA datasets
Pytorch implementation of Generative Adversarial Networks (GAN) [1] and Deep Convolutional Generative Adversarial Networks (DCGAN) [2] for MNIST [3] and CelebA [4] datasets.
If you want to train using cropped CelebA dataset, you have to change isCrop = False to isCrop = True.
you can download
pytorch_CelebA_DCGAN.py requires 64 x 64 size image, so you have to resize CelebA dataset (celebA_data_preprocess.py).
pytorch_CelebA_DCGAN.py added learning rate decay code.
GAN | DCGAN |
MNIST | GAN after 100 epochs | DCGAN after 20 epochs |
Training loss
Learning Time
DCGAN | DCGAN crop |
CelebA | DCGAN after 20 epochs | DCGAN crop after 30 epochs |
[1] Goodfellow, Ian, et al. "Generative adversarial nets." Advances in neural information processing systems. 2014.
(Full paper: http://papers.nips.cc/paper/5423-generative-adversarial-nets.pdf)
[2] Radford, Alec, Luke Metz, and Soumith Chintala. "Unsupervised representation learning with deep convolutional generative adversarial networks." arXiv preprint arXiv:1511.06434 (2015).
(Full paper: https://arxiv.org/pdf/1511.06434.pdf)
[3] 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.
[4] Liu, Ziwei, et al. "Deep learning face attributes in the wild." Proceedings of the IEEE International Conference on Computer Vision. 2015.