In the repository, we implemeted a few common Bayesian models with TensorFlow and TensorFlow Probability, most with variational inference. We also aim to provide detailed examples on these implemented models.
We recommend using conda to set a separate environment for installing all necessary dependent packages, which you could use the following commond lines to create an environment TFProb for the dependent packages:
conda create -n TFProb python=3.7 scipy numpy matplotlib scikit-learn tensorflow=2.0.0
Note, tensorflow-probability v0.8.0 is not available on conda yet, you could install it from PyPI:
conda activate TFProb
pip install tensorflow-probability==0.8.0
Also, you could add the newly created environment TFProb into IPython kernel. (make sure you have ipykernel).
conda activate TFProb
conda install ipykernel
python -m ipykernel install --user --name TFProb --display-name "TFProb"
To activate the created environment, use conda activate TFProb
- MacBook fails to work with both tf.tensordot and np.tensordot (or np.dot), while Linux works fine. See the reported issue.
- Many of the functions should be implemeted with PyTorch too, which is under testing.