Skip to content
DCGAN LSGAN WGAN-GP DRAGAN Tensorflow 2
Branch: master
Clone or download
Latest commit d800aff Apr 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
imlib Tensorflow 2.0 Alpha Apr 7, 2019
pics Tensorflow 2.0 Alpha Apr 7, 2019
pylib Tensorflow 2.0 Alpha Apr 7, 2019
tf2gan Tensorflow 2.0 Alpha Apr 7, 2019
tf2lib Tensorflow 2.0 Alpha Apr 7, 2019
v1 Tensorflow 2.0 Alpha Apr 7, 2019
.gitignore Tensorflow 2.0 Alpha Apr 7, 2019
LICENSE
README.md
commands.sh Tensorflow 2.0 Alpha Apr 7, 2019
data.py
make_gif.py Tensorflow 2.0 Alpha Apr 7, 2019
module.py Tensorflow 2.0 Alpha Apr 7, 2019
train.py train.py: update Apr 15, 2019

README.md

Recommendation

  • Our GAN based work for facial attribute editing - AttGAN.

New

  • We re-implement these GANs by Tensorflow 2! The old version is here: v1 or in the "v1" directory.


GANs - Tensorflow 2

Tensorflow 2 implementations of DCGAN, LSGAN, WGAN-GP and DRAGAN.

Exemplar results

Fashion-MNIST

DCGAN LSGAN WGAN-GP DRAGAN

CelebA

DCGAN LSGAN
WGAN-GP DRAGAN

Anime

WGAN-GP DRAGAN

Usage

  • Prerequisites

    • Tensorflow 2.0 Alpha pip install tensorflow==2.0.0-alpha0
    • Tensorflow Addons pip install tensorflow-addons
    • (if you meet "tf.summary.histogram fails with TypeError" pip install --upgrade tb-nightly)
    • scikit-image, oyaml, tqdm
    • Python 3.6
  • Datasets

  • Examples of training

    • Fashion-MNIST DCGAN

      CUDA_VISIBLE_DEVICES=0 python train.py --dataset=fashion_mnist --epoch=25 --adversarial_loss_mode=gan
    • CelebA DRAGAN

      CUDA_VISIBLE_DEVICES=0 python train.py --dataset=celeba --epoch=25 --adversarial_loss_mode=gan --gradient_penalty_mode=dragan
    • Anime WGAN-GP

      CUDA_VISIBLE_DEVICES=0 python train.py --dataset=anime --epoch=200 --adversarial_loss_mode=wgan --gradient_penalty_mode=wgan-gp --n_d=5
    • see more training exampls in commands.sh

    • tensorboard for loss visualization

      tensorboard --logdir ./output/fashion_mnist_gan/summaries --port 6006
You can’t perform that action at this time.