Skip to content

This is an implementation of the paper 'Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks' in pytorch. See

Notifications You must be signed in to change notification settings

gxwangupc/DCGAN-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is an implementation of the paper 'Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks' in pytorch. See

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages