LynnHo / DTLC-GAN-Tensorflow

DTLC-GAN Tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DTLC-GAN

Tensorflow implementation of DTLC-GAN (CVPR 2018): Generative Adversarial Image Synthesis with Decision Tree Latent Controller.

Usage

  • Prerequisites

    • Tensorflow 1.9
    • Python 3.6
  • Training

    • Important Arguments (See the others in train.py)
      • att: attribute to learn (default: '')
      • ks: # of outputs of each node of each layer (default: [2, 3, 3])
      • lambdas: loss weights of each layer (default: [1.0, 1.0, 1.0])
      • --n_d: # of d steps in each iteration (default: 1)
      • --n_g: # of g steps in each iteration (default: 1)
      • --loss_mode: gan loss (choices: [gan, lsgan, wgan, hinge], default: gan)
      • --gp_mode: type of gradient penalty (choices: [none, dragan, wgan-gp], default: none)
      • --norm: normalization (choices: [batch_norm, instance_norm, layer_norm, none], default: batch_norm)
      • --experiment_name: name for current experiment (default: default)
    • Example
      CUDA_VISIBLE_DEVICES=0 \
      python train.py \
      --att Eyeglasses \
      --ks 2 3 3 \
      --lambdas 1 1 1 \
      --n_d 1 \
      --n_g 1 \
      --loss_mode hinge \
      --gp_mode dragan \
      --norm layer_norm \
      --experiment_name att{Eyeglasses}_ks{2-3-3}_lambdas{1-1-1}_continuous_last{False}_loss{hinge}_gp{dragan}_norm{layer_norm}

Dataset

Exemplar Results

  1. Eyeglasses, 3 layers

  1. Bangs, 3 layers

About

DTLC-GAN Tensorflow

License:MIT License


Languages

Language:Python 100.0%