Giter Site home page Giter Site logo

cgan-pytorch's Introduction

Conditional Generative Adversarial Networks

This example implements a conditional generative adversarial network, as illustrated in Conditional Generative Adversarial Nets

This implementation is very close to the dcgan implementation.

After every 100 training iterations, the files real_samples.png and fake_samples_%3d.png are written to disk with the samples from the generative model.

After every epoch, models are saved to: netG_epoch_%d.pth and netD_epoch_%d.pth

Downloading the dataset

You can download the MNIST dataset here

You can download the LSUN dataset by cloning this repo and running

python download.py -c bedroom

Usage

usage: main.py [-h] --dataset DATASET --dataroot DATAROOT 
               [--batchSize BATCHSIZE] [--imageSize IMAGESIZE] [--channels CHANNELS]
               [--latentdim LATENDIM] [--n_classes N_CLASSES] [--epoch EPOCH] [--lrte LRATE]
               [--beta1 BETA1] [--cuda] [--ngpu NGPU] [--netG NETG]
               [--netD NETD]

optional arguments:
  -h, --help            show this help message and exit
  --dataset DATASET     cifar10 | lsun | mnist
  --dataroot DATAROOT   path to dataset
  --batchSize BATCHSIZE 
                        input batch size
  --imageSize IMAGESIZE
                        the height / width of the input image to network
  --channels CHANNELS   the channels of the input image to network 
  --latentdim LATENTDIM the size of the latent vector 
  --n_classes N_CLASSES the number of classes/labels in the dataset
  --epoch EPOCH         number of epochs to train for
  --lrate LRATE         learning rate, default=0.0002
  --beta BETA           beta for adam. default=0.5
  --beta1 BETA1         beta1 for adam. default=0.999
  --output              folder to output images. defualt=.
  --randomseed          

cgan-pytorch's People

Contributors

kmualim 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.