Based on two papers: -PREDICTING DISTRIBUTIONS WITH LINEARIZING BELIEF NETWORKS by Yann N. Dauphin, David Grangier. http://arxiv.org/abs/1511.05622
-TECHNIQUES FOR LEARNING BINARY STOCHASTIC FEEDFORWARD NEURAL NETWORKS Tapani Raiko, Mathias Berglund, Guillaume Alain and Laurent Dinh