bayesian-nn is a lightweight Bayesian neural network library built on top of tensorflow where training is completed with stochastic variational inference (SVI). The library is intended to resemble tf.slim and help avoid massive boilerplate code. The end goal is to facilitate speedy development of Bayesian neural net models in the case where multiple stacked layers are required.
Note: This project is still under active development!
pip install bayesian-nn
import bayesian-nn as bnn
bayesian-nn primarily provides the user with the flexibility of stacking neural net layers where weight distributions are trained through SVI.
Pre-implemented layers include:
Layer | bayesian-nn |
---|---|
FullyConnected | bnn.fully_connected |
Conv2d | bnn.conv2d |
Conv2dTranspose (Deconv) | bnn.conv2d_transpose |
RNN | bnn.rnn |
The user can also further simplify boilerplate code through the following side features: