Git Product home page Git Product logo

pixel-rnn-tensorflow's Introduction

PixelCNN & PixelRNN in TensorFlow

TensorFlow implementation of Pixel Recurrent Neural Networks. This implementation contains:

model

  1. PixelCNN
  • Masked Convolution (A, B)
  1. PixelRNN
  • Row LSTM (in progress)
  • Diagonal BiLSTM (skew, unskew)
  • Residual Connections
  • Multi-Scale PixelRNN (in progress)
  1. Datasets
  • MNIST
  • cifar10 (in progress)
  • ImageNet (in progress)

Requirements

Usage

First, install prerequisites with:

$ pip install tqdm gym[all]

To train a pixel_rnn model with mnist data (slow iteration, fast convergence):

$ python main.py --data=mnist --model=pixel_rnn

To train a pixel_cnn model with mnist data (fast iteration, slow convergence):

$ python main.py --data=mnist --model=pixel_cnn --hidden_dims=64 --recurrent_length=2 --out_hidden_dims=64

To generate images with trained model:

$ python main.py --data=mnist --model=pixel_rnn --is_train=False

Samples

Samples generated with pixel_cnn after 50 epochs.

generation_2016_08_01_16_40_28.jpg

Training details

Below results uses two different parameters

[1] --hidden_dims=16 --recurrent_length=7 --out_hidden_dims=32
[2] --hidden_dims=64 --recurrent_length=2 --out_hidden_dims=64

Training results of pixel_rnn with [1] (yellow) and [2] (green) with epoch as x-axis:

pixel_rnn

Training results of pixel_cnn with [1] (orange) and [2] (purple) with epoch as x-axis:

pixel_cnn

Training results of pixel_rnn (yellow, green) and pixel_cnn (orange, purple) with hour as x-axis:

pixel_rnn_cnn_relative

References

Author

Taehoon Kim / @carpedm20

pixel-rnn-tensorflow's People

Contributors

carpedm20 avatar

Watchers

paper2code - bot 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.