brendanhasz / probflow

A Python package for building Bayesian models with TensorFlow or PyTorch
http://probflow.readthedocs.io
MIT License
171 stars 17 forks source link

Multiple MC samples per batch #21

Closed brendanhasz closed 3 years ago

brendanhasz commented 4 years ago

Currently ProbFlow uses just a single MC sample from variational posteriors per batch. Fitting will be much more stable if we can use more. In fact I'm pretty sure it's impossible to use mixture distributions as variational posteriors with just 1 MC sample...?

This'll require some expand_dims-ing of the input tensors/numpy arrays/pandas d... Hmm won't work with pandas dataframes 🤔 .

Also means user slicing code in __call__ methods could cause problems.... Maybe just have the default be 1 and tell users to handle it if they want >1 (but handle it in applications and modules like Dense / DenseNetwork).