Skip to content

iDurugkar/GMAN

Repository files navigation

Generative Multi-Adversarial Networks

This code is a representative of the code used to run experiments for the paper [Generative Multi-Adversarial Networks](https://openreview.net/forum?id=Byk-VI9eg) currently under review for [ICLR 2017](http://www.iclr.cc).

With the current code you can run GMAN with 1 or more discriminators and either the modified objective or the originally derived one.

Instructions

Code used while training MNIST:

python GMAN.py --dataset mnist --num_disc 1 --lam 0. --path mnist/arith1_0 --objective modified --num_hidden 128

The repository contains code to experiment on Generative Adversarial Nets with multiple Discriminators.

An example is given below:

$ python GMAN.py --dataset mnist --num_disc 1 --lam 0. --path testing_dataset

$ python GMAN.py --dataset Data/my_images --num_disc 1 --lam 0. --path testing_dataset

There are three standard datasets you can run on: MNIST, CIFAR-10 and CelebA.

You can run on these 3 datasets just by mentioning them by name as above.

To download these, you can run the `download.py` file. It will download the dataset in the `./Data` directory. The instructions to use are:

$ python download.py mnist
$ python download.py celebA
$ python download.py cifar

You can then run

$ python GMAN.py

The various arguments that can be passed can be seen at the bottom of the code.

Alternate Dataset

You can load your custom dataset as well. The dataset should be image files or a `.npy` array with shape `(dataset_size, 32, 32, num_channels)`. Set the flag `--dataset` and give the path to the `.npy` array or the directory of images to load.

You should also set the `--path` parameter to the path where you want to save the results. It won't work otherwise.

The code automatically normalizes the data to [-1, 1].

About

GANs with multiple Discriminators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published