Giter VIP home page Giter VIP logo

scaled-mmd-gan's Introduction

Scaled MMD GANs

Official Tensorflow implementation for reproducing results of On gradient regularizers for MMD GANs.

Setup

Install:

pip install -r requirements.txt

The GPU compatible version of tensorflow is required for this code to work.

Download CelebA dataset:

cd scripts
OUTPUT_DATA_DIR=/path/to/output/directory/
python scripts/download.py celebA -- $OUTPUT_DATA_DIR

Download ImageNet dataset:

Please download ILSVRC2012 dataset from http://image-net.org/download-images

Preprocess ImageNet dataset:

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

Download inception model:

python source/inception/download.py --outfile=datasets/inception_model

Training

Unsupervised image generation of 64x64 ImageNet:

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 ([email protected])

References

Michael Arbel, Dougal J. Sutherland, Mikołaj Bińkowski, Arthur Gretton. On gradient regularizers for MMD GANs. arXiv

scaled-mmd-gan's People

Contributors

mbinkowski avatar djsutherland avatar michaelarbel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.