Skip to content

Lightweight Bayesian neural net library for tensorflow

License

Notifications You must be signed in to change notification settings

arieling/bayesian-nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Lightweight Bayesian neural net library for tensorflow

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages