Giter Club home page Giter Club logo

pytorch_infogan's Introduction

InfoGAN in Pytorch (v 1.0)

Basic Implementation (Study friendly) of InfoGAN in Pytorch

More Information: Original Paper

About this algorithm (in Korean): My Blog Post

1. Environments

  • Ubuntu 16.04
  • Python 3.6 (Anaconda)
  • Pytorch 0.2.0
  • Torchvision 0.1.9

2. Networks and Parameters

2.1 Hyper-Parameters

  • Image Size = 28x28x1 MNIST / 64x64x3 CelebA
  • Batch Size = 16
  • Test Batch Size (Sample Size) = 100 (10x10)
  • Learning Rate = 0.0002 for D, 0.001 for G
  • Adam_beta1 = 0.5
  • z_dim = 62 MNIST / 128 CelebA
  • InfoGAN Continuous Code Dimension = 1
  • InfoGAN Discrete Code Dimension = 10
  • Continuous Code Weight = 0.1~0.5 MNIST / 1.0 CelebA
  • Discrete Code Weight = 1
  • Epoch = 50 MNIST / 4 CelebA

2.2 Generator Networks (network.py)

2.2.1 MNIST

2.2.2 CelebA

2.3 Discriminator Networks (network.py)

2.3.1 MNIST

2.3.2 CelebA

3. Run (Train)

You can modify hyper-parameter. Look at the parsing part of the code.

3. 1 MNIST

Train

python infogan.py

3. 2 CelebA DB (Cropped Face, 156253 Samples)

Data Download

chmod +x celebdownload.sh
./celebdownload.sh

Train

python infogan.py --db 'celebA' --image_size 64 --z_dim 128 --continuous_weight 1.0 --num_epochs 4

4. Test

Will be uploaded

5. Results

CelebA (4 Epochs)

Discrete(Categorical) Code adjusts personality/skin color

Continuous Code adjusts emotion (Smile)

MNIST (c_weight = 0.1, 40 Epochs)

MNIST (c_weight = 0.1, 50 Epochs)

MNIST (c_weight = 0.5, 35 Epochs)

MNIST (c_weight = 0.5, 50 Epochs)

pytorch_infogan's People

Contributors

taeoh-kim 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.