tf.raw_ops.RandomGamma
Outputs random values from the Gamma distribution(s) described by alpha.
tf.raw_ops.RandomGamma(
shape, alpha, seed=0, seed2=0, name=None
)
This op uses the algorithm by Marsaglia et al. to acquire samples via transformation-rejection from pairs of uniform and normal random variables. See http://dl.acm.org/citation.cfm?id=358414
| Args | |
|---|---|
shape | A Tensor. Must be one of the following types: int32, int64. 1-D integer tensor. Shape of independent samples to draw from each distribution described by the shape parameters given in alpha. |
alpha | A Tensor. Must be one of the following types: half, float32, float64. A tensor in which each scalar is a "shape" parameter describing the associated gamma distribution. |
seed | An optional int. Defaults to 0. 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. |
seed2 | An optional int. Defaults to 0. A second seed to avoid seed collision. |
name | A name for the operation (optional). |
| Returns | |
|---|---|
A Tensor. Has the same type as alpha. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/raw_ops/RandomGamma