Following are good code references:
-
Reference to tensorflow probability
-
TFP CVAE code
-
Flipout documentation
-
Blog1 - keras implementation
-
Blog2 - juandoriz
Research Papers to consider:
-
Kingma paper
-
BayesByBackprop
-
Weiwei Pan
-
Evidential Regression
-
Flipout
Following files contain the following:
- TFP_DenseVAE_MNIST
MNIST generation using Variational AutoEncoder
Uses TensorflowProbability. IndependentNormal for stochastic hidden units
- TFP_LinearRegression
Using HMC for linear regression
Easy linear regression problem solved using MCMC HMC algorithm
- TFP_Understanding_HMC
HMC algorithm code
Uses a one parameter example to demonstrate how to sample using HMC
- VAE_FromScratch
Functional API, Gradient Tape
Using deterministic architecture to build a probabilistic model
- MCMC_Linear_MetropolisHastings
From scratch implementation of MCMC. Use of Metropolis hastings algorithm
- FullMCMC_BNN_***
Using MCMC to solve a simple neural network
We try several stragies:
- Randomly initialized weights
- Some weights fixed
- Early stopping
Early stopping gave good results.
- BNN_DenseVariational
Using BayesByBackprop to find distribution of the weights
In this exercise, we also experiment with flipout layers, and apparently get better results.