Official Tensorflow implementation for reproducing results of On gradient regularizers for MMD GANs.
pip install -r requirements.txt
The GPU compatible version of tensorflow is required for this code to work.
OUTPUT_DATA_DIR=/path/to/output/directory/
python scripts/download.py celebA -- $OUTPUT_DATA_DIR
Please download ILSVRC2012 dataset from http://image-net.org/download-images
IMAGENET_TRAIN_DIR=/path/to/imagenet/train/
PREPROCESSED_DATA_DIR=/path/to/save_dir/
TFRECORDS_DATA_DIR=/path/to/output/tfrecords
bash preprocess.sh $IMAGENET_TRAIN_DIR $PREPROCESSED_DATA_DIR
build_imagenet_data --train_directory=$PREPROCESSED_DATA_DIR --output_directory=$TFRECORDS_DATA_DIR
python source/inception/download.py --outfile=datasets/inception_model
DATADIR=/path/to/datadir/
OUTDIR=/path/to/outputdir/
CONFIG=configs/imagenet_smmd.yml
# multi-GPU: 3 GPUs
CUDA_VISIBLE_DEVICES=0,1,2 python gan/main.py -dataset imagenet -data_dir $DATADIR -name -config_file $CONFIG -out_dir $OUTDIR -multi_gpu true
For any question, please feel free to contact Michael Arbel (michael.n.arbel@gmail.com
)
Michael Arbel, Dougal J. Sutherland, Mikołaj Bińkowski, Arthur Gretton. On gradient regularizers for MMD GANs. arXiv
DATADIR="data/cifar-10-batches-py/"
OUTDIR="out/"
# multi-GPU: 1 GPUs
CUDA_VISIBLE_DEVICES=0 python gan/main.py -name trial_1 -config_file configs/cifar10_smmd.yml
Experiment result in experiment/