Basic Implementation (Study friendly) of InfoGAN in Pytorch
More Information: Original Paper
About this algorithm (in Korean): My Blog Post
- GAN: [Pytorch][Tensorflow]
- DCGAN: [Pytorch][Tensorflow]
- InfoGAN: [Pytorch][Tensorflow]
- Pix2Pix: [Pytorch][Tensorflow]
- DiscoGAN: [Pytorch][Tensorflow]
- Ubuntu 16.04
- Python 3.6 (Anaconda)
- Pytorch 0.2.0
- Torchvision 0.1.9
- 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
You can modify hyper-parameter. Look at the parsing part of the code.
Train
python infogan.py
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
Will be uploaded
Discrete(Categorical) Code adjusts personality/skin color
Continuous Code adjusts emotion (Smile)