Skip to main content

Package for doing approximate Bayesian inference on deep neural networks [based in TF 2.0+]

Project description

deepbayes

deepbayes is a package that aims to make training Bayesian neural networks (BNNs) simple.

Implemented on top of TensorFlow 2.0 and working with tf.keras as a primary interface, one can simply declare a keras (or TF) model and pass it to the desired deepbayes optimizer and it will compile the model into an object that is ready to perform approximate inference.

deepbayes is actively under development, and location and names of packages may change (such changes will be noted at the bottom of this repo). jax support coming soon :)

Install:

pip install deepbayes

Supported Optimizers

BayesByBackprop

Implemented based on description in https://arxiv.org/abs/1505.05424

Hamiltonian (Hybrid) Monte Carlo

Implemented based on description in https://arxiv.org/abs/1206.1901

NoisyAdam (aka Vadam)

Implemented based on description in https://arxiv.org/abs/1712.02390

Variational Online Gauss Newton (aka VOGN)

Implemented based on description in https://arxiv.org/abs/1806.04854 and https://arxiv.org/abs/2002.10060

Stochastic Weight Averaging - Gaussian (aka SWAG)

Implemented bsed on description in https://arxiv.org/pdf/1902.02476.pdf

Stochastic Gradient Descent

Not sure what to reference you to here... a google will suffice

Supported Analysis

In addition to producing posterior distributions for BNNs, deepbayes also supports some basic analysis including

Dependancies:

tensorflow, tensorflow-probability, numpy, tqdm, statsmodels,

Future Support

Below we have a tentative to-do list of inference methods to impliment (7 to be exact) and other properties we want to tool to have.

  • HTML documentation
  • Non-Gaussian Posterior (requires extension of posterior representation as well)
  • Stochastic Variational Inference (SVI)
  • Probabilistic Backprop (PBP)
  • Sequential Monte Carlo optimizer (SMC)
  • Monte Carlo Dropout optimizer (MCD)
  • Stochastic Gradient Langevin Dynamics optimizer (SGLD)
  • Stochastic Gradient Markov Chain Monte Carlo (SGMCMC)
  • Riemann manifold HMC (RMHMC)
  • JAX autodif library instead of TF (deepbayes.jax.optimizers)
  • Binary Bayesian neural networks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepbayes-0.1.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepbayes-0.1.0-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file deepbayes-0.1.0.tar.gz.

File metadata

  • Download URL: deepbayes-0.1.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.5

File hashes

Hashes for deepbayes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4de33aa41bad5420d86cb7f9aa0f584e443c0d97879657b6c29041f1731e91b
MD5 50aa5c39396a9fd3f6e0c5bfc5ccef34
BLAKE2b-256 f753c4104050aad970ba84412db722ea45e3ef5875c916b9b94698edce884201

See more details on using hashes here.

File details

Details for the file deepbayes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deepbayes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.5

File hashes

Hashes for deepbayes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c28f6efff9c8a65b3356225da4fa6a7674e61b24cc2eaa9781f7d73983a3865b
MD5 a013cb05e2ad967dd800b8788a0e9346
BLAKE2b-256 98ecb665adb0c46218b4f31bdfe9cee515df656eff7ff04802638ddc32be5218

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page