Skip to content

gpapamak/bayesian_neural_networks_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bayesian neural networks demo

A demo of Bayesian neural networks on a toy binary classification problem.

Two ways of implementing Bayesian neural networks are demonstrated:

  • Stochastic Variational Inference using local reparameterization [1]
  • Hamiltonian Monte Carlo [2]

[1] Kingma et al., Variational Dropout and the Local Reparameterization Trick, NeurIPS 2015. [arXiv]

[2] Neal, MCMC using Hamiltonian dynamics, Handbook of Markov Chain Monte Carlo, 2011. [arXiv]

How to run the code

Display the training data:

python run.py --show

Train a non-Bayesian neural network by minimizing cross-entropy:

python run.py --mle

Train a Bayesian neural network using Stochastic Variarional Inference:

python run.py --svi

Train a Bayesian neural network using Hamiltonian Monte Carlo:

python run.py --hmc

About

A demo of Bayesian neural networks, using SVI and HMC.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages