Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.44 KB

README.md

File metadata and controls

38 lines (28 loc) · 1.44 KB

bayesian-nn

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!

Installation

pip install bayesian-nn

Usage

import bayesian-nn as bnn

How are Bayesian neural nets trained with SVI?

Layers

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

Features

The user can also further simplify boilerplate code through the following side features:

  • arg_scope: allow users to define default arguments for specific operations within that scope.
  • repeat: allow users to repeatedly perform the same operation with the same parameters.
  • stack: allow users to perform the same operation with different parameters.

References