Skip to content

Firyuza/SGAN

Repository files navigation

SGAN: several GAN

Pytorch implementation of SGAN: An Alternative Training of Generative Adversarial Networks where global Discriminator and Generator are trained using local pairs (GANs).

SGAN_scheme

Dependencies

  • 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

Usage

In config.py you can set up your own parameters:

  1. Dataset type.
  2. Parameters values for training SGAN.
  3. 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.

Results

MNIST

After 1st epoch (128 batch size):

  • Global pair:
    mnist1_global

  • Local pair #1:
    mnist1_local1

After 14th epoch:

  • Global pair:
    mnist14_global

CelebA

After 1st epoch (128 batch size):

  • Global pair:
    celebA1_global

  • Local pair #5:
    celebA1_local5

After 2nd epoch:

  • Global pair:
    celebA2_global

Inception Score on validation dataset for Global Pair:
celebA_IS_global

Training details

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.

Related works

Author

Firiuza Shigapova / @Firyuza github

About

SGAN: An Alternative Training of Generative Adversarial Networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages