--- id: tensorflow-probability version: "0.25.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # tensorflow-probability — Probabilistic modeling and statistical inference in TensorFlow License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does TensorFlow Probability is a library for probabilistic reasoning and statistical analysis built on top of TensorFlow. It provides a layered toolkit: distributions with broadcasting semantics, bijectors for transforming random variables, joint distributions for modeling dependencies, probabilistic neural network layers, and inference algorithms including MCMC, variational inference, and Monte Carlo methods. The library integrates automatic differentiation for gradient-based inference and supports hardware acceleration via GPUs and distributed computation. It is designed for Bayesian machine learning workflows where you need to model uncertainty, perform hierarchical inference, or combine probabilistic methods with deep networks. The package also works as a JAX substrate, allowing the same probabilistic abstractions to run on JAX instead of TensorFlow. It is actively maintained but carries Beta status, meaning its public interfaces may change. Use it for: - Build Bayesian neural networks with uncertainty over weights and predictions for safety-critical applications. - Perform hierarchical statistical modeling and inference on grouped or nested data using joint distributions. - Implement variational autoencoders and other deep generative models with probabilistic layers. - Run MCMC sampling for posterior inference in complex probabilistic models. - Estimate covariances, mixture models, and other statistical quantities with automatic differentiation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. TensorFlow Probability provides probabilistic modeling, statistical inference, and Bayesian machine learning tools integrated with TensorFlow, including distributions, variational inference, MCMC sampling, and neural network layers with uncertainty quantification. Yes, if you need probabilistic modeling or Bayesian inference in a TensorFlow workflow. The library is actively maintained, has low install friction, carries no security vulnerabilities, and offers a comprehensive toolkit for uncertainty quantification and statistical learning. Install with caution only if TensorFlow is not already a dependency in your project, since it adds a substantial indirect dependency; verify that the Beta status and potential interface changes align with your stability requirements. ## Install pip install tensorflow-probability uv add tensorflow-probability poetry add tensorflow-probability ## Installing tensorflow-probability Before you install: Low install friction with a pure-Python wheel and common dependencies. The package is actively maintained with recent commits and has been in development since 2018, though it carries a Beta development status indicating interfaces may still change. License in practice: Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions—you must include a copy of the license and state significant changes, but there are no copyleft obligations. Quickstart: pip install tensorflow-probability import tensorflow_probability as tfp dist = tfp.distributions.Normal(loc=0., scale=1.) samples = dist.sample() Requires TensorFlow as an implicit dependency (not listed in runtime deps but essential for core functionality); also requires Python 3.9 or later. Verify before relying: - Whether TensorFlow is declared as a dependency elsewhere or must be installed separately by the user. - Performance characteristics and scalability limits for large-scale probabilistic models on GPUs. - Compatibility and feature parity between TensorFlow and JAX substrate implementations. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags probabilistic modeling tensorflow, bayesian inference machine learning, mcmc sampling variational inference, probabilistic neural networks, statistical distributions tensorflow, uncertainty quantification deep learning, bayesian deep learning, probabilistic-modeling, bayesian-inference, uncertainty-quantification [View on SkillFed](https://skillfed.io/packages/tensorflow-probability) · [View on PyPI](https://pypi.org/project/tensorflow-probability/)