https://github.com/ferrine/gelato
Bayesian dessert for Lasagne
https://github.com/ferrine/gelato
bayesian-inference deep-learning gelato lasagne neural-network theano uncertainty variational-inference
Last synced: 3 months ago
JSON representation
Bayesian dessert for Lasagne
- Host: GitHub
- URL: https://github.com/ferrine/gelato
- Owner: ferrine
- License: mit
- Created: 2016-11-26T16:28:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T11:38:46.000Z (almost 8 years ago)
- Last Synced: 2025-03-17T23:14:39.155Z (3 months ago)
- Topics: bayesian-inference, deep-learning, gelato, lasagne, neural-network, theano, uncertainty, variational-inference
- Language: Python
- Homepage:
- Size: 346 KB
- Stars: 84
- Watchers: 8
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gelato
[](https://travis-ci.org/ferrine/gelato)
[](https://coveralls.io/github/ferrine/gelato?branch=master)
## 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](https://github.com/Theano/Theano), [Lasagne](https://github.com/Lasagne/Lasagne) and [PyMC3](https://github.com/pymc-devs/pymc3).Installation
------------* from github (assumes bleeding edge pymc3 installed)
```bash
# pip install git+git://github.com/pymc-devs/pymc3.git
pip install git+https://github.com/ferrine/gelato.git
```
* from source
```bash
git clone https://github.com/ferrine/gelato
pip install -r gelato/requirements.txt
pip install -e gelato
```Usage
-----
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.**Warning**
- `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.Examples
--------
For comprehensive example of using `Gelato` you can reference [this](https://github.com/ferrine/gelato/blob/master/examples/mnist.ipynb) notebookLife Hack
---------
Any `spec` class can be used standalone so feel free to use it everywhereReferences
----------
Charles Blundell et al: "Weight Uncertainty in Neural Networks" ([arXiv preprint arXiv:1505.05424](https://arxiv.org/abs/1505.05424))