ความน่าจะเป็นของเทนเซอร์โฟลว์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TensorFlow Probability คือคลังข้อมูลสำหรับการให้เหตุผลเชิงความน่าจะเป็นและการวิเคราะห์ทางสถิติใน TensorFlow ในฐานะส่วนหนึ่งของระบบนิเวศ TensorFlow ความน่าจะเป็นของ TensorFlow นำเสนอการบูรณาการวิธีการความน่าจะเป็นกับเครือข่ายเชิงลึก การอนุมานตามการไล่ระดับสีโดยใช้การสร้างความแตกต่างอัตโนมัติ และความสามารถในการปรับขนาดให้กับชุดข้อมูลและแบบจำลองขนาดใหญ่ที่มีการเร่งด้วยฮาร์ดแวร์ (GPU) และการคำนวณแบบกระจาย
หากต้องการเริ่มต้นใช้งาน TensorFlow Probability โปรดดู คู่มือการติดตั้ง และดู บทช่วยสอนสมุดบันทึก Python
ส่วนประกอบ
เครื่องมือแมชชีนเลิร์นนิงที่น่าจะเป็นของเรามีโครงสร้างดังนี้:
เลเยอร์ 0: TensorFlow
การดำเนินการเชิงตัวเลข โดยเฉพาะคลาส LinearOperator
ช่วยให้การใช้งานแบบไร้เมทริกซ์สามารถใช้ประโยชน์จากโครงสร้างเฉพาะ (แนวทแยง ระดับต่ำ ฯลฯ) เพื่อการคำนวณที่มีประสิทธิภาพ สร้างและดูแลโดยทีม TensorFlow Probability และเป็นส่วนหนึ่งของ tf.linalg
ใน core TensorFlow
เลเยอร์ 1: หน่วยการสร้างทางสถิติ
เลเยอร์ 2: การสร้างโมเดล
- การแจกแจงร่วม (เช่น
tfp.distributions.JointDistributionSequential
): การแจกแจงร่วมเหนือการแจกแจงแบบพึ่งพาซึ่งกันและกันตั้งแต่หนึ่งรายการขึ้นไป หากต้องการทราบข้อมูลเบื้องต้นเกี่ยวกับการสร้างแบบจำลองด้วย JointDistribution
ของ TFP โปรดดูที่ Colab นี้ - เลเยอร์ความน่าจะเป็น (
tfp.layers
): เลเยอร์โครงข่ายประสาทเทียมที่มีความไม่แน่นอนเหนือฟังก์ชันที่เลเยอร์เหล่านั้นแสดง ซึ่งจะขยายเลเยอร์ TensorFlow
ชั้นที่ 3: การอนุมานความน่าจะเป็น
- Markov chain Monte Carlo (
tfp.mcmc
): อัลกอริทึมสำหรับการประมาณอินทิกรัลผ่านการสุ่มตัวอย่าง รวมถึง Hamiltonian Monte Carlo , Metropolis-Hastings แบบเดินสุ่ม และความสามารถในการสร้างเคอร์เนลการเปลี่ยนแปลงแบบกำหนดเอง - การอนุมานแบบแปรผัน (
tfp.vi
): อัลกอริทึมสำหรับการประมาณอินทิกรัลผ่านการปรับให้เหมาะสม - เครื่องมือเพิ่มประสิทธิภาพ (
tfp.optimizer
): วิธีการเพิ่มประสิทธิภาพ Stochastic ขยายเครื่องมือเพิ่มประสิทธิภาพ TensorFlow รวมถึง Stochastic Gradient Langevin Dynamics - Monte Carlo (
tfp.monte_carlo
): เครื่องมือสำหรับการคำนวณความคาดหวังของ Monte Carlo
ความน่าจะเป็นของ TensorFlow อยู่ระหว่างการพัฒนาและอินเทอร์เฟซอาจมีการเปลี่ยนแปลง
ตัวอย่าง
นอกจาก บทช่วยสอนสมุดบันทึก Python ที่แสดงอยู่ในการนำทางแล้ว ยังมีสคริปต์ตัวอย่างบางส่วนให้เลือก:
รายงานปัญหา
รายงานข้อบกพร่องหรือคำขอคุณสมบัติโดยใช้ เครื่องมือติดตามปัญหาความน่าจะเป็นของ TensorFlow
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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)."]]