컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 랜덤감마
#include <random_ops.h>
알파로 설명된 감마 분포에서 임의의 값을 출력합니다.
요약
이 작업은 Marsaglia et al.의 알고리즘을 사용합니다. 균일 확률 변수와 정규 확률 변수 쌍으로부터 변환-거부(Transformation-Rejection)를 통해 샘플을 획득합니다. http://dl.acm.org/citation.cfm?id=358414를 참조하세요.
인수:
- 범위: 범위 개체
- 모양: 1차원 정수 텐서. 알파에 제공된 모양 매개변수로 설명되는 각 분포에서 추출할 독립 표본의 모양입니다.
- 알파: 각 스칼라가 관련 감마 분포를 설명하는 "모양" 매개변수인 텐서입니다.
선택적 속성( Attrs
참조):
- Seed:
seed
또는 seed2
0이 아닌 값으로 설정된 경우 난수 생성기는 지정된 시드에 의해 시드됩니다. 그렇지 않으면 무작위 시드에 의해 시드됩니다. - Seed2: 시드 충돌을 피하기 위한 두 번째 시드입니다.
보고:
-
Output
: 모양 shape + shape(alpha)
의 텐서. 각 슬라이스 [:, ..., :, i0, i1, ...iN]
alpha[i0, i1, ...iN]
에 대해 그려진 샘플이 포함되어 있습니다. 출력의 dtype은 알파의 dtype과 일치합니다.
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
시드2
Attrs Seed2(
int64 x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::RandomGamma Class Reference\n\ntensorflow::ops::RandomGamma\n============================\n\n`#include \u003crandom_ops.h\u003e`\n\nOutputs random values from the Gamma distribution(s) described by alpha.\n\nSummary\n-------\n\nThis op uses the algorithm by Marsaglia et al. to acquire samples via transformation-rejection from pairs of uniform and normal random variables. See \u003chttp://dl.acm.org/citation.cfm?id=358414\u003e\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 alpha.\n- alpha: A tensor in which each scalar is a \"shape\" parameter describing the associated gamma distribution.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_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(alpha)`. Each slice `[:, ..., :, i0, i1, ...iN]` contains the samples drawn for `alpha[i0, i1, ...iN]`. The dtype of the output matches the dtype of alpha.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RandomGamma](#classtensorflow_1_1ops_1_1_random_gamma_1a54b3819de158eaa8e1f4dd2e09c38350)`(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)` alpha)` ||\n| [RandomGamma](#classtensorflow_1_1ops_1_1_random_gamma_1afb5a4dcc9f3b7849c9ccf8e49233c658)`(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)` alpha, const `[RandomGamma::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_random_gamma_1a3442325c98888cd41398f85c8dc7215d) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_random_gamma_1ae108904c41339fe8cced748589ef2622) | `::`[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_gamma_1a0a8429580ed9eda5d1b850c9fc9cd7c6)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_random_gamma_1ad5e60091b7438c54f6d2457fccba06ed)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_random_gamma_1a20b55a813e49ae84f48cd79c87285409)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [Seed](#classtensorflow_1_1ops_1_1_random_gamma_1a62800c601cb18e766b0f41f18f86f335)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs) |\n| [Seed2](#classtensorflow_1_1ops_1_1_random_gamma_1a42984b9ff3911c8867903be5bcd97ac7)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::RandomGamma::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs) | Optional attribute setters for [RandomGamma](/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma). |\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### RandomGamma\n\n```gdscript\n RandomGamma(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n ::tensorflow::Input alpha\n)\n``` \n\n### RandomGamma\n\n```gdscript\n RandomGamma(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n ::tensorflow::Input alpha,\n const RandomGamma::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### Seed\n\n```text\nAttrs Seed(\n int64 x\n)\n``` \n\n### Seed2\n\n```text\nAttrs Seed2(\n int64 x\n)\n```"]]