https://github.com/vsimkus/torch-reparametrised-mixture-distribution
PyTorch implementation of the mixture distribution family with implicit reparametrisation gradients.
https://github.com/vsimkus/torch-reparametrised-mixture-distribution
data-science gradients machine-learning mixture-distributions mixture-model mixture-of-gaussians pytorch variational-inference
Last synced: 3 days ago
JSON representation
PyTorch implementation of the mixture distribution family with implicit reparametrisation gradients.
- Host: GitHub
- URL: https://github.com/vsimkus/torch-reparametrised-mixture-distribution
- Owner: vsimkus
- Created: 2021-06-15T08:49:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T11:14:02.000Z (over 1 year ago)
- Last Synced: 2025-05-13T21:41:07.622Z (5 months ago)
- Topics: data-science, gradients, machine-learning, mixture-distributions, mixture-model, mixture-of-gaussians, pytorch, variational-inference
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reparametrisable PyTorch MixtureSameFamily distribution
PyTorch implementation of the implicit reparametrisation trick for mixture distributions based on [Figurnov et al., 2019, "Implicit Reparameterization Gradients"](https://papers.nips.cc/paper/2018/hash/92c8c96e4c37100777c7190b76d28233-Abstract.html) and the implementation in [Tensorflow Probability](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/MixtureSameFamily).
Can be readily used for variational inference with mixture distribution variational families.
Remarks:
* For multivariate mixtures, the class is currently implemented when the mixture component distributions fully factorise.
* Also added a `StableNormal` distribution, which overrides the default `cdf` method with a more stable implementation from . The implementation also provides a `_log_cdf` method, however it is not used for the implicit reparametrisation.