Module: tf.random

Public API for tf.random namespace.


experimental module: Public API for tf.random.experimental namespace.


class Algorithm: An enumeration.

class Generator: Random-number generator.


all_candidate_sampler(...): Generate the set of all classes.

categorical(...): Draws samples from a categorical distribution.

create_rng_state(...): Creates a RNG state from an integer or a vector.

fixed_unigram_candidate_sampler(...): Samples a set of classes using the provided (fixed) base distribution.

gamma(...): Draws shape samples from each of the given Gamma distribution(s).

get_global_generator(...): Retrieves the global generator.

learned_unigram_candidate_sampler(...): Samples a set of classes from a distribution learned during training.

log_uniform_candidate_sampler(...): Samples a set of classes using a log-uniform (Zipfian) base distribution.

normal(...): Outputs random values from a normal distribution.

poisson(...): Draws shape samples from each of the given Poisson distribution(s).

set_global_generator(...): Replaces the global generator with another Generator object.