Code for "Sequential Neural Models with Stochastic Layers"
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Sequential Neural Models with Stochastic Layers

This repository contains the implementation of the Stochastic Recurrent Neural Network (SRNN) model described in

Sequential Neural Models with Stochastic Layers
Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, Ole Winther
NIPS 2016, arXiv preprint arXiv:1605.07571

The implementation is built on the Theano, Lasagne and Parmesan libraries.

If you have questions on the code, feel free to create a Github issue or contact us: Marco Fraccaro (, Søren Kaae Sønderby (


Please make sure you have installed the requirements before executing the python scripts.

  pip install numpy
  pip install matplotlib
  pip install
  pip install
  git clone
  cd parmesan
  python develop


The repository includes code to run the SRNN on polyphonic music and TIMIT data.

  • runs the polyphonic music experiment on the Muse data set.
  • runs the TIMIT experiment. Unfortunately we cannot release the TIMIT data, that needs to be obtained from We have released however our preprocessing script,

Further details on the experimental setup can be found in the code and in the supplementary material of the paper.