Probabilité TensorFlow
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
TensorFlow Probability est une bibliothèque de raisonnement probabiliste et d'analyse statistique dans TensorFlow. Dans le cadre de l'écosystème TensorFlow, TensorFlow Probability permet l'intégration de méthodes probabilistes avec des réseaux profonds, une inférence basée sur le gradient utilisant la différenciation automatique et une évolutivité vers de grands ensembles de données et modèles avec accélération matérielle (GPU) et calcul distribué.
Pour démarrer avec TensorFlow Probability, consultez le guide d'installation et consultez les didacticiels du notebook Python .
Composants
Nos outils d'apprentissage automatique probabilistes sont structurés comme suit :
Couche 0 : TensorFlow
Les opérations numériques , en particulier la classe LinearOperator
, permettent des implémentations sans matrice qui peuvent exploiter une structure particulière (diagonale, de bas rang, etc.) pour un calcul efficace. Il est construit et maintenu par l'équipe TensorFlow Probability et fait partie de tf.linalg
dans le noyau TensorFlow.
Couche 1 : Éléments de base statistiques
- Distributions (
tfp.distributions
) : une vaste collection de distributions de probabilité et de statistiques associées avec une sémantique de lots et de diffusion . - Bijecteurs (
tfp.bijectors
) : Transformations réversibles et composables de variables aléatoires. Les bijecteurs fournissent une riche classe de distributions transformées, depuis des exemples classiques comme la distribution log-normale jusqu'à des modèles sophistiqués d'apprentissage en profondeur tels que les flux autorégressifs masqués .
Couche 2 : Construction de modèles
- Distributions conjointes (par exemple,
tfp.distributions.JointDistributionSequential
) : distributions conjointes sur une ou plusieurs distributions éventuellement interdépendantes. Pour une introduction à la modélisation avec les JointDistribution
de TFP, consultez cette collaboration - Couches probabilistes (
tfp.layers
) : couches de réseau neuronal avec une incertitude sur les fonctions qu'elles représentent, étendant les couches TensorFlow.
Couche 3 : Inférence probabiliste
- Chaîne de Markov Monte Carlo (
tfp.mcmc
) : algorithmes d'approximation des intégrales via échantillonnage. Comprend l'hamiltonien Monte Carlo , Metropolis-Hastings à marche aléatoire et la possibilité de créer des noyaux de transition personnalisés. - Inférence variationnelle (
tfp.vi
) : algorithmes pour approximer les intégrales par optimisation. - Optimiseurs (
tfp.optimizer
) : méthodes d'optimisation stochastique, étendant les optimiseurs TensorFlow. Comprend la dynamique de Langevin à gradient stochastique . - Monte Carlo (
tfp.monte_carlo
) : Outils de calcul des attentes de Monte Carlo.
TensorFlow Probability est en cours de développement actif et les interfaces peuvent changer.
Exemples
En plus des didacticiels du notebook Python répertoriés dans la navigation, quelques exemples de scripts sont disponibles :
Signaler des problèmes
Signalez des bogues ou des demandes de fonctionnalités à l'aide de l'outil de suivi des problèmes TensorFlow Probability .
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[],[],null,["# TensorFlow Probability\n\n\u003cbr /\u003e\n\nTensorFlow Probability is a library for probabilistic reasoning and statistical\nanalysis in TensorFlow. As part of the TensorFlow ecosystem, TensorFlow\nProbability provides integration of probabilistic methods with deep networks,\ngradient-based inference using automatic differentiation, and scalability to\nlarge datasets and models with hardware acceleration (GPUs) and distributed\ncomputation.\n\nTo get started with TensorFlow Probability, see the\n[install guide](./install) and view the\n[Python notebook tutorials](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/).\n\nComponents\n----------\n\nOur probabilistic machine learning tools are structured as follows:\n\n### Layer 0: TensorFlow\n\n*Numerical operations* ---in particular, the `LinearOperator`\nclass---enables matrix-free implementations that can exploit a particular structure\n(diagonal, low-rank, etc.) for efficient computation. It is built and maintained\nby the TensorFlow Probability team and is part of\n[`tf.linalg`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/linalg)\nin core TensorFlow.\n\n### Layer 1: Statistical Building Blocks\n\n- *Distributions* ([`tfp.distributions`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions)): A large collection of probability distributions and related statistics with batch and [broadcasting](https://docs.scipy.org/doc/numpy-1.14.0/user/basics.broadcasting.html) semantics.\n- *Bijectors* ([`tfp.bijectors`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/bijectors)): Reversible and composable transformations of random variables. Bijectors provide a rich class of transformed distributions, from classical examples like the [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_distribution) to sophisticated deep learning models such as [masked autoregressive flows](https://arxiv.org/abs/1705.07057).\n\n### Layer 2: Model Building\n\n- Joint Distributions (e.g., [`tfp.distributions.JointDistributionSequential`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions/joint_distribution_sequential.py)): Joint distributions over one or more possibly-interdependent distributions. For an introduction to modeling with TFP's `JointDistribution`s, check out [this colab](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Modeling_with_JointDistribution.ipynb)\n- *Probabilistic layers* ([`tfp.layers`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/layers)): Neural network layers with uncertainty over the functions they represent, extending TensorFlow layers.\n\n### Layer 3: Probabilistic Inference\n\n- *Markov chain Monte Carlo* ([`tfp.mcmc`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/mcmc)): Algorithms for approximating integrals via sampling. Includes [Hamiltonian Monte Carlo](https://en.wikipedia.org/wiki/Hamiltonian_Monte_Carlo), random-walk Metropolis-Hastings, and the ability to build custom transition kernels.\n- *Variational Inference* ([`tfp.vi`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/vi)): Algorithms for approximating integrals through optimization.\n- *Optimizers* ([`tfp.optimizer`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/optimizer)): Stochastic optimization methods, extending TensorFlow Optimizers. Includes [Stochastic Gradient Langevin Dynamics](http://www.icml-2011.org/papers/398_icmlpaper.pdf).\n- *Monte Carlo* ([`tfp.monte_carlo`](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/monte_carlo)): Tools for computing Monte Carlo expectations.\n\nTensorFlow Probability is under active development and interfaces may change.\n\nExamples\n--------\n\nIn addition to the\n[Python notebook tutorials](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/)\nlisted in the navigation, there are some example scripts available:\n\n- [Variational Autoencoders](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/vae.py) ---Representation learning with a latent code and variational inference.\n- [Vector-Quantized Autoencoder](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/vq_vae.py) ---Discrete representation learning with vector quantization.\n- [Bayesian Neural Networks](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/bayesian_neural_network.py) ---Neural networks with uncertainty over their weights.\n- [Bayesian Logistic Regression](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/logistic_regression.py) ---Bayesian inference for binary classification.\n\nReport issues\n-------------\n\nReport bugs or feature requests using the\n[TensorFlow Probability issue tracker](https://github.com/tensorflow/probability/issues)."]]