LostTech.TensorFlow : API Documentation

Type gen_stateless_random_ops

Namespace tensorflow.python.ops.gen_stateless_random_ops

Public static methods

Tensor stateless_multinomial(IGraphNodeBase logits, IGraphNodeBase num_samples, IGraphNodeBase seed, ImplicitContainer<T> output_dtype, string name)

Tensor stateless_multinomial(IGraphNodeBase logits, IGraphNodeBase num_samples, IGraphNodeBase seed, PythonClassContainer output_dtype, string name)

object stateless_multinomial_dyn(object logits, object num_samples, object seed, ImplicitContainer<T> output_dtype, object name)

Draws deterministic pseudorandom samples from a multinomial distribution. (deprecated)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.random.stateless_categorical instead.

This is a stateless version of tf.random.categorical: if run twice with the same seeds, it will produce the same pseudorandom numbers. The output is consistent across multiple runs on the same hardware (and between CPU and GPU), but may change between versions of TensorFlow or on non-CPU/GPU hardware.

Example:
Parameters
object logits
2-D Tensor with shape `[batch_size, num_classes]`. Each slice `[i, :]` represents the unnormalized log-probabilities for all classes.
object num_samples
0-D. Number of independent samples to draw for each row slice.
object seed
A shape [2] integer Tensor of seeds to the random number generator.
ImplicitContainer<T> output_dtype
integer type to use for the output. Defaults to int64.
object name
Optional name for the operation.
Returns
object
The drawn samples of shape `[batch_size, num_samples]`.
Show Example
# samples has shape [1, 5], where each value is either 0 or 1 with equal
            # probability.
            samples = tf.random.stateless_categorical(
                tf.math.log([[0.5, 0.5]]), 5, seed=[7, 17]) 

object stateless_multinomial_eager_fallback(IGraphNodeBase logits, IGraphNodeBase num_samples, IGraphNodeBase seed, ImplicitContainer<T> output_dtype, string name, Context ctx)

object stateless_multinomial_eager_fallback(IGraphNodeBase logits, IGraphNodeBase num_samples, IGraphNodeBase seed, PythonClassContainer output_dtype, string name, Context ctx)

object stateless_multinomial_eager_fallback_dyn(object logits, object num_samples, object seed, ImplicitContainer<T> output_dtype, object name, object ctx)

Tensor stateless_random_normal(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name)

object stateless_random_normal_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name)

object stateless_random_normal_eager_fallback(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name, Context ctx)

object stateless_random_normal_eager_fallback_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name, object ctx)

Tensor stateless_random_uniform(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name)

object stateless_random_uniform_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name)

object stateless_random_uniform_eager_fallback(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name, Context ctx)

object stateless_random_uniform_eager_fallback_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name, object ctx)

Tensor stateless_random_uniform_int(IGraphNodeBase shape, IGraphNodeBase seed, IGraphNodeBase minval, IGraphNodeBase maxval, PythonFunctionContainer name)

Tensor stateless_random_uniform_int(IGraphNodeBase shape, IGraphNodeBase seed, IGraphNodeBase minval, IGraphNodeBase maxval, string name)

object stateless_random_uniform_int_dyn(object shape, object seed, object minval, object maxval, object name)

object stateless_random_uniform_int_eager_fallback(IGraphNodeBase shape, IGraphNodeBase seed, IGraphNodeBase minval, IGraphNodeBase maxval, string name, Context ctx)

object stateless_random_uniform_int_eager_fallback_dyn(object shape, object seed, object minval, object maxval, object name, object ctx)

Tensor stateless_truncated_normal(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name)

object stateless_truncated_normal_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name)

object stateless_truncated_normal_eager_fallback(IGraphNodeBase shape, IGraphNodeBase seed, ImplicitContainer<T> dtype, string name, Context ctx)

object stateless_truncated_normal_eager_fallback_dyn(object shape, object seed, ImplicitContainer<T> dtype, object name, object ctx)

Public properties

PythonFunctionContainer stateless_multinomial_eager_fallback_fn get;

PythonFunctionContainer stateless_multinomial_fn get;

PythonFunctionContainer stateless_random_normal_eager_fallback_fn get;

PythonFunctionContainer stateless_random_normal_fn get;

PythonFunctionContainer stateless_random_uniform_eager_fallback_fn get;

PythonFunctionContainer stateless_random_uniform_fn get;

PythonFunctionContainer stateless_random_uniform_int_eager_fallback_fn get;

PythonFunctionContainer stateless_random_uniform_int_fn get;

PythonFunctionContainer stateless_truncated_normal_eager_fallback_fn get;

PythonFunctionContainer stateless_truncated_normal_fn get;