tensorflow:: אופס:: RandomPoissonV2
#include <random_ops.h>
מוציא ערכים אקראיים מהתפלגות ה-Poisson המתוארות לפי קצב.
תַקצִיר
פעולה זו משתמשת בשני אלגוריתמים, בהתאם לקצב. אם שיעור >= 10, אז האלגוריתם של הורמן משמש לרכישת דגימות באמצעות טרנספורמציה-דחייה. ראה http://www.sciencedirect.com/science/article/pii/0167668793909974 .
אחרת, האלגוריתם של Knuth משמש לרכישת דגימות באמצעות הכפלת משתנים אקראיים אחידים. ראה Donald E. Knuth (1969). אלגוריתמים סמינמריים. אמנות תכנות המחשב, כרך 2. אדיסון ווסלי
טיעונים:
- scope: אובייקט Scope
- צורה: טנזור 1-D מספר שלם. צורה של דגימות עצמאיות לציור מכל התפלגות המתוארת על ידי פרמטרי הצורה הניתנים בקצב.
- rate: טנזור שבו כל סקלר הוא פרמטר "קצב" המתאר את התפלגות הרעיל הקשורה.
מאפיינים אופציונליים (ראה Attrs
):
- seed: אם
seed
או seed2
מוגדרים כלא-אפס, מחולל המספרים האקראיים מוזרע על ידי ה-seed הנתון. אחרת, הוא נזרע על ידי זרע אקראי. - seed2: זרע שני כדי למנוע התנגשות זרע.
החזרות:
-
Output
: טנזור עם צורה shape + shape(rate)
. כל פרוסה [:, ..., :, i0, i1, ...iN]
מכילה את הדגימות שצוירו עבור rate[i0, i1, ...iN]
.
פונקציות סטטיות ציבוריות |
---|
Dtype (DataType x) | |
Seed (int64 x) | |
Seed2 (int64 x) | |
תכונות ציבוריות
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
RandomPoissonV2
RandomPoissonV2(
const ::tensorflow::Scope & scope,
::tensorflow::Input shape,
::tensorflow::Input rate
)
RandomPoissonV2
RandomPoissonV2(
const ::tensorflow::Scope & scope,
::tensorflow::Input shape,
::tensorflow::Input rate,
const RandomPoissonV2::Attrs & attrs
)
צוֹמֶת
::tensorflow::Node * node() const
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
Dtype
Attrs Dtype(
DataType x
)
זֶרַע
Attrs Seed(
int64 x
)
זרע 2
Attrs Seed2(
int64 x
)
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# tensorflow::ops::RandomPoissonV2 Class Reference\n\ntensorflow::ops::RandomPoissonV2\n================================\n\n`#include \u003crandom_ops.h\u003e`\n\nOutputs random values from the Poisson distribution(s) described by rate.\n\nSummary\n-------\n\nThis op uses two algorithms, depending on rate. If rate \\\u003e= 10, then the algorithm by Hormann is used to acquire samples via transformation-rejection. See \u003chttp://www.sciencedirect.com/science/article/pii/0167668793909974\u003e.\n\nOtherwise, Knuth's algorithm is used to acquire samples via multiplying uniform random variables. See Donald E. Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Addison Wesley\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- shape: 1-D integer tensor. Shape of independent samples to draw from each distribution described by the shape parameters given in rate.\n- rate: A tensor in which each scalar is a \"rate\" parameter describing the associated poisson distribution.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs#structtensorflow_1_1ops_1_1_random_poisson_v2_1_1_attrs)):\n\n- seed: If either `seed` or `seed2` are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.\n- seed2: A second seed to avoid seed collision.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A tensor with shape `shape + shape(rate)`. Each slice `[:, ..., :, i0, i1, ...iN]` contains the samples drawn for `rate[i0, i1, ...iN]`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RandomPoissonV2](#classtensorflow_1_1ops_1_1_random_poisson_v2_1ac6781b746b5d655d44cf7298d0ec0e8d)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` rate)` ||\n| [RandomPoissonV2](#classtensorflow_1_1ops_1_1_random_poisson_v2_1affe491853f03c22d0d69fe155380690d)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` rate, const `[RandomPoissonV2::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs#structtensorflow_1_1ops_1_1_random_poisson_v2_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a8a6d22a45ef402122008fd37ae60584a) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_random_poisson_v2_1aacc4e0f70e7215919fd2ed050cc778ec) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a2c4c1c5791ce65536c0711c345c5104f)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a680111c81759da8f485b7c57830a97c8)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_random_poisson_v2_1ab0e8e0cee5576ad5d628eb26db934fc6)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [Dtype](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a16ea2843b7cb14092e392a1634d5f9d3)`(DataType x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs#structtensorflow_1_1ops_1_1_random_poisson_v2_1_1_attrs) |\n| [Seed](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a4923276f993adff27a39549f725e140c)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs#structtensorflow_1_1ops_1_1_random_poisson_v2_1_1_attrs) |\n| [Seed2](#classtensorflow_1_1ops_1_1_random_poisson_v2_1a3db3d3b1dcf6fd61014a43d46719c992)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs#structtensorflow_1_1ops_1_1_random_poisson_v2_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::RandomPoissonV2::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs) | Optional attribute setters for [RandomPoissonV2](/versions/r2.1/api_docs/cc/class/tensorflow/ops/random-poisson-v2#classtensorflow_1_1ops_1_1_random_poisson_v2). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### RandomPoissonV2\n\n```gdscript\n RandomPoissonV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n ::tensorflow::Input rate\n)\n``` \n\n### RandomPoissonV2\n\n```gdscript\n RandomPoissonV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n ::tensorflow::Input rate,\n const RandomPoissonV2::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Dtype\n\n```carbon\nAttrs Dtype(\n DataType x\n)\n``` \n\n### Seed\n\n```text\nAttrs Seed(\n int64 x\n)\n``` \n\n### Seed2\n\n```text\nAttrs Seed2(\n int64 x\n)\n```"]]