Skip to content

raahii/infogan-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InfoGAN

This is a pytorch implementation of InfoGAN.

This repository has the following features that others do not have:

  • Highly customizable.

    • You can use this for your own dataset, settings.
    • Most parameters including the latent variable design can be customized by editing the yaml config file.
  • OK clean, structured codes

    • This is totally my personal point of view. 😉
  • TensorBoard is available by default.

Result

on MNIST dataset

  • latent variable design
    • z ~ N(0, 1), 64 dimensions
    • c1 ~ Cat(K=10, p=0.1)
    • c2, c3, c4 ~ N(0, 1)
  • batchsize: 300, epochs: 500
  • mnist.yaml
c1 (digit type) c2 (rotation)
mnist_c1_image mnist_c2_image
c3 (line thickness) c4 (digit width)
mnist_c4_image mnist_c5_image

Prerequisites

  • Python (~3.6)

Getting Started

make setup
  • Start training

    python src/train.py --config <config.yaml>

    You need to specify all of training settings with yaml fromat. Example files are placed under configs/.

    If you want to try training anyway, my configuration for debugging is available.

    make debug
  • Open tensorboard

    make tb

    Training metrics (ex. loss) are printed on console and tensorboard.

    By default, tensorboard watches ./results directory. To change the path, execute tensorboard --logdir <path> or edit Makefile.

TODO

  • upload result on MNIST dataset.
  • upload result on Fashion-MNIST dataset.
  • automatic hyper-parameters tuning with Optuna.