Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.86 KB

README.md

File metadata and controls

48 lines (41 loc) · 1.86 KB

Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks(DCGAN)


Introduction

Environment & Requirements

  • CentOS Linux release 7.2.1511 (Core)
  • python 3.6.5
  • pytorch 1.0.0
  • torchvision
  • argparse
  • os
  • random
  • subprocess
  • urllib

Usage

Train DCGAN with MNIST:

python3 main.py --dataset mnist --cuda

Two folders will be created, i.e., ./data & ./results. The ./data folder stores dataset.
The ./results folder stores the generated images and the trained models.
You can also use cifar10, lsun, imagenet, randomly generated fake data, etc.

Download lsun dataset:

python3 download_lsun.py --category bedroom 

Download data for bedroom and save it to ./data.
By replacing the option of --category, you can download data of each category in LSUN as well.
python3 download_lsun.py
Download the whole data set.

NOTE

  • The DCGAN architecture is a relatively primary version. Now there exists some new modifications.
  • The batch_size, size of feature maps of both G and D are all set to 64, different from that in the paper (128).
  • With above hyperparameters set to 128, the model confronts gradient vanishing. Hope someone help me with it.

References

  1. PyTorch documentation
  2. https://github.com/pytorch/examples/tree/master/dcgan
  3. https://github.com/fyu/lsun