コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::ランダムポアソンV2
#include <random_ops.h>
レートで記述されたポアソン分布からランダムな値を出力します。
まとめ
この演算では、レートに応じて 2 つのアルゴリズムを使用します。レート >= 10 の場合、Hormann によるアルゴリズムを使用して、変換拒否を介してサンプルが取得されます。 http://www.sciencedirect.com/science/article/pii/0167668793909974を参照してください。
それ以外の場合は、Knuth のアルゴリズムを使用して、一様な確率変数を乗算してサンプルを取得します。 Donald E. Knuth (1969) を参照してください。半数値アルゴリズム。 『コンピューター プログラミングの芸術』第 2 巻 アディソン ウェスリー
引数:
- スコープ:スコープオブジェクト
- 形状: 1 次元整数テンソル。レートで指定された形状パラメーターによって記述される各分布から抽出される独立したサンプルの形状。
- rate: 各スカラーが、関連するポアソン分布を記述する「レート」パラメーターであるテンソル。
オプションの属性 ( Attrs
を参照):
- シード:
seed
またはseed2
いずれかが 0 以外に設定されている場合、乱数ジェネレーターには指定されたシードがシードされます。それ以外の場合は、ランダム シードによってシードされます。 - シード2: シードの衝突を避けるための 2 番目のシード。
戻り値:
-
Output
: 形状shape + shape(rate)
を持つテンソル。各スライス[:, ..., :, i0, i1, ...iN]
rate[i0, i1, ...iN]
に対して描画されたサンプルが含まれています。
パブリック属性
公共機能
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
Dタイプ
Attrs Dtype(
DataType x
)
シード2
Attrs Seed2(
int64 x
)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 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```"]]