tf.raw_ops.RandomGamma  |  TensorFlow v2.16.1 (original) (raw)

tf.raw_ops.RandomGamma

Stay organized with collections Save and categorize content based on your preferences.

Outputs random values from the Gamma distribution(s) described by alpha.

View aliases

Compat aliases for migration

SeeMigration guide for more details.

tf.compat.v1.raw_ops.RandomGamma

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.