Coder Social home page Coder Social logo

dcgan's Introduction

DCGAN

PyTorch implementation of Deep Convolutional Generative Adversarial Networks (DCGAN)

Network architecture

  • Generator

    • hidden layers: Four 4x4 strided convolutional layers (1024, 512, 256, and 128 kernels, respectively) with ReLU
    • output layer: 4x4 strided convolutional layer (4096 nodes = 64x64 size image) with Tanh
    • Batch normalization is used except for output layer
  • Discriminator

    • hidden layers: Four 4x4 convolutional layers (128, 256, 512, and 1024 kernels, respectively) with Leaky ReLU
    • output layer: 4x4 convolutional layer (1 node) with Sigmoid
    • Batch normalization is used except for 1st hidden layer & output layer

Generating MNIST dataset

  • MNIST image is resized to 64x64 size image

Results

  • For learning rate = 0.0002 (Adam optimizer), batch size = 128, # of epochs = 20:
GAN losses Generated images

Generating CelebA dataset

  • 108x108 center region of CelebA image is cropped, and resized to 64x64 size image

Results

  • For learning rate = 0.0002 (Adam optimizer), batch size = 128, # of epochs = 20:
GAN losses Generated images

References

  1. https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/deep_convolutional_gan
  2. https://github.com/znxlwm/pytorch-MNIST-CelebA-GAN-DCGAN
  3. https://github.com/moono/moo-dl-practice/tree/master/Work-place/DCGAN-MNIST
  4. https://github.com/moono/moo-dl-practice/tree/master/Work-place/DCGAN-celebA

dcgan's People

Contributors

togheppi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dcgan's Issues

why tanh at last layer in generator

hey,
values in input data ie. mnist digits are between 0-255, then why are you applying tanh at the last layer in generator and making it between -1 and 1. For discriminator, input came from traindata and generated data will be on different scale then how will it learn or for that matter how can we even compare and make it learn.

output of generator

Hi,

Thank you for you code open source.
I am currently doing similar things, but I found that the output of generator is 68*68, not 64*64. It is very strange that I can not get 64 after calculations.

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.