Pytorch implementation of SGAN: An Alternative Training of Generative Adversarial Networks where global Discriminator and Generator are trained using local pairs (GANs).
- Python==2.7+
- scipy==1.1.0
- six==1.11.0
- tensorboardX==1.4
- tensorflow==1.4.1
- tensorflow-tensorboard==1.5.1
- torch==0.4.0
- torchvision==0.2.1
- easydict==1.9
- matplotlib==3.0.0
- numpy==1.15.4
In config.py you can set up your own parameters:
- Dataset type.
- Parameters values for training SGAN.
- Folders/files name for saving training process/result.
I worked with MNIST and CelebA, for downloading these datasets you can use scripts from this repo.
In main.py training process is running.
After 1st epoch (128 batch size):
After 14th epoch:
After 1st epoch (128 batch size):
After 2nd epoch:
Inception Score on validation dataset for Global Pair:
There is a possibility to use WGAN and WGAN with gradient penalty,
but I could't succeed with it. If you see any error in code, please let me know!
I achieved such results using DCGAN with vanilla loss function based on Kullback-Leibler Divergence.
Firiuza Shigapova / @Firyuza github