tensorflow / probability

Probabilistic reasoning and statistical analysis in TensorFlow
https://www.tensorflow.org/probability/
Apache License 2.0
4.24k stars 1.1k forks source link

Bayesian Neural Network hierarchical prior #1451

Open shifdz opened 2 years ago

shifdz commented 2 years ago

The default prior in Convolution3DReparametrization() is tfp.layers.default_multivariate_normal_fn which is an isotrophic Gaussian with mean 0 and standard devitaion1. The posterior is tfp_layers_util.default_mean_field_normal_fn() . Is it possible to specify a hierarchical model for prior and posterior for example, prior~N(0,sigma) and sigma~Gamma(a1,b1)? How can I implement this in Tensorflow probability, may be with tfd.JointDistributionSequential?

bryorsnef commented 2 years ago

I've been wondering about the easiest way to implement this too. Have you made any progress? It seems like tfd.JointDistributionSequential should work but it seems like all the tfp.layers don't accept tfd.JointDistributionSequential.