# Bayesian recurrent neural network with keras and pymc3/edward

I have a very simple toy recurrent neural network implemented in keras which, given an input of N integers will return their mean value. I would like to be able to modify this to a bayesian neural network with either pymc3 or edward.lib so that I can get a posterior distribution on the output value

e.g. p(output | weights).

I have read through blog posts from autograd, pymc3 and edward [1,2,3] but all seem geared to classification problems.

Cheers

# Edit

To clarify - I am asking if anyone can offer some experience/advice/references relevant to building a Bayesian RNN in anything other than a classification task.

From a pure implementation perspective, it should be straightforward: take your model code, replace every trainable Variable creation with ed.Normal(...) or sth similar, establish variational posteriors as well, zip them in a dict, feed it to some inference object from edward et voila.