This code requires Theano (version 0.7.0) and a Keras fork (https://github.com/yaringal/keras, branch BayesianRNN).
Note that keras now supports dropout in RNNs following the implementation in this repo. A simplified example of the sentiment analysis experiment using the latest keras implementation is given here.