/SNGAN_Projection

An unofficial PyTorch implementation of SNGAN (ICLR 2018) and cGANs with projection discriminator (ICLR 2018)

Primary LanguagePythonMIT LicenseMIT

GANs with spectral normalization and projection discriminator

This is an unofficial PyTorch implementation of sngan_projection

Miyato, Takeru, and Masanori Koyama. "cGANs with projection discriminator." arXiv preprint arXiv:1802.05637 (2018).

Dependencies:

  • PyTorch1.0
  • numpy
  • scipy
  • tensorboardX
  • tqdm
  • torchviz pip install torchviz and graphviz sudo apt-get install graphviz

Usage:

There are two ways to run the training script:

  • Run the script directly (We recommend this way): python3 main.py or python main.py. In this way, the training parameters can be modified by modifying the parameter.py parameter defaults.

Parameters

Parameters Function
--version Experiment name
--train Set the model stage, Ture---training stage; False---testing stage
--experiment_description Descriptive text for this experiment
--total_step Totally training step
--batch_size Batch size
--g_lr Learning rate of generator
--d_lr Learning rate of discriminator
--parallel Enable the parallel training
--dataset Set the dataset name,lsun,celeb,cifar10
--cuda Set GPU device number
--image_path The root dir to training dataset
--FID_mean_cov The root dir to dataset moments npz file

Results

We have reproduced the FID (in Cifar-10, best result is FID=17.2) result reported in the paper.

The convergence curve of FID is as follows:

image

CIFAR10 results

200K:

image

500K:

image

600K:

image

800K:

image

1000K:

image

Acknowledgement