Code Monkey home page Code Monkey logo

progressive_growing_of_gans-pytorch's Introduction

PyTorch implementation of Progressive Growing of GANs

A PyTorch implementation of "Progressive Growing of GANs for Improved Quality, Stability and Variability" (https://arxiv.org/abs/1710.10196) compatible with PyTorch 0.4.

Implementation details

  • The growing of the GAN is based on a progress parameter p that increases during training. This parameter drives the sizes of input and output of the generator and the discriminator.
  • The equalized learning rate is achieved by the WScaleLayer that mutliplies the input of the convolution by the normalization constant from He's initializer instead of modifying the convolution weights.
  • The networks input and output resolutions depend on the maxRes parameter: the images will be square of resolution 4 * 2^(maxRes): maxRes=0 -> 4x4, maxRes=1 -> 8x8, ..., maxRes=8 -> 1024x1024

I tried to follow the original article as much as possible. This repo gives a simple example of how it can be used on MNIST.

This implementation was done in Python 3.6 and uses f-string so this will create errors in previous Python versions.

Generated Images

This is a gif of the training obtained from the PG-GAN on MNIST during 210 epochs (60 epochs of growing + 150 epochs of stabilizing) by running python mnist_example.py --PN --WS

MNIST-Training-GIF

More results coming for CIFAR10.

Acknowledgement

Author

Jerome Rony @jeromerony

progressive_growing_of_gans-pytorch's People

Contributors

hellog2n avatar jeromerony 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.