Skip to content
Bayesian dessert for Lasagne
Python Shell
Branch: master
Clone or download
ferrine Fix example (#9)
* change flat init

* change flat init

* change flat init

* update example
Latest commit 7782802 Jun 25, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Integrate opvi (#3) May 8, 2017
gelato Fix example (#9) Jun 25, 2017
img upd readme Nov 26, 2016
.coveragerc Added tests Nov 27, 2016
.gitignore add examples dir to gitignore Nov 28, 2016
.travis.yml add coveralls (#5) May 10, 2017
LICENSE Initial commit Nov 26, 2016
requirements-dev.txt add coveralls (#5) May 10, 2017
requirements.txt Integrate opvi (#3) May 8, 2017


Coverage Status

Bayesian dessert for Lasagne

Recent results in Bayesian statistics for constructing robust neural networks have proved that it is one of the best ways to deal with uncertainty, overfitting but still having good performance. Gelato will help to use bayes for neural networks. Library heavily relies on Theano, Lasagne and PyMC3.


  • from github (assumes bleeding edge pymc3 installed)
    # pip install git+git://
    pip install git+
  • from source
    git clone
    pip install -r gelato/requirements.txt
    pip install -e gelato


I use generic approach for decorating all Lasagne at once. Thus, for using Gelato you need to replace import statements for layers only. For constructing a network you need to be the in pm.Model context environment.


  • lasagne.layers.noise is not supported
  • lasagne.layers.normalization is not supported (theano problems with default updates)
  • functions from lasagne.layers are hidden in gelato as they use Lasagne classes. Some exceptions are done for lasagne.layers.helpers. I'll try to solve the problem generically in future.


For comprehensive example of using Gelato you can reference this notebook

Life Hack

Any spec class can be used standalone so feel free to use it everywhere


Charles Blundell et al: "Weight Uncertainty in Neural Networks" (arXiv preprint arXiv:1505.05424)

You can’t perform that action at this time.