Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: RastgelePoissonV2
#include <random_ops.h>
Orana göre tanımlanan Poisson dağılımlarından rastgele değerler çıkarır.
Özet
Bu operasyonda hıza bağlı olarak iki algoritma kullanılır. Hız >= 10 ise, dönüşüm-reddetme yoluyla örneklerin elde edilmesi için Hormann'ın algoritması kullanılır. Bkz. http://www.sciencedirect.com/science/article/pii/0167668793909974 .
Aksi halde, tekdüze rastgele değişkenlerin çarpılması yoluyla numuneler elde etmek için Knuth'un algoritması kullanılır. Bkz. Donald E. Knuth (1969). Yarı Sayısal Algoritmalar. Bilgisayar Programlama Sanatı, Cilt 2. Addison Wesley
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- şekil: 1 boyutlu tamsayı tensörü. Oran olarak verilen şekil parametreleri ile tanımlanan her dağılımdan bağımsız numunelerin şekli çizilir.
- oran: Her skalerin ilgili poisson dağılımını tanımlayan bir "oran" parametresi olduğu bir tensör.
İsteğe bağlı özellikler (bkz. Attrs
):
- tohum:
seed
veya seed2
biri sıfırdan farklı olarak ayarlanırsa, rastgele sayı üreteci verilen tohum tarafından tohumlanır. Aksi takdirde rastgele bir tohumla tohumlanır. - tohum2: Tohum çarpışmasını önlemek için ikinci bir tohum.
İade:
-
Output
: şekil shape + shape(rate)
olan bir tensör. Her dilim [:, ..., :, i0, i1, ...iN]
rate[i0, i1, ...iN]
için çizilmiş örnekleri içerir.
Genel statik işlevler |
---|
Dtype (DataType x) | |
Seed (int64 x) | |
Seed2 (int64 x) | |
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Dtipi
Attrs Dtype(
DataType x
)
Tohum
Attrs Seed(
int64 x
)
Tohum2
Attrs Seed2(
int64 x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 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/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape, ::`[tensorflow::Input](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` rate, const `[RandomPoissonV2::Attrs](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_random_poisson_v2_1aacc4e0f70e7215919fd2ed050cc778ec) | `::`[tensorflow::Output](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/struct/tensorflow/ops/random-poisson-v2/attrs) | Optional attribute setters for [RandomPoissonV2](/versions/r1.15/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```"]]