Have a question? Connect with the community at the TensorFlow Forum Visit Forum

StatelessRandomGetKeyCounterAlg

public final class StatelessRandomGetKeyCounterAlg

Picks the best algorithm based on device, and scrambles seed into key and counter.

This op picks the best counter-based RNG algorithm based on device, and scrambles a shape-[2] seed into a key and a counter, both needed by the counter-based algorithm. The scrambling is opaque but approximately satisfies the property that different seed results in different key/counter pair (which will in turn result in different random numbers).

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output < TInt32 >
alg ()
The RNG algorithm (shape int32[]).
Output <?>
counter ()
Counter for the counter-based RNG algorithm.
static StatelessRandomGetKeyCounterAlg
create ( Scope scope, Operand <? extends TNumber > seed)
Factory method to create a class wrapping a new StatelessRandomGetKeyCounterAlg operation.
Output <?>
key ()
Key for the counter-based RNG algorithm (shape uint64[1]).

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "StatelessRandomGetKeyCounterAlg"

Public Methods

public Output < TInt32 > alg ()

The RNG algorithm (shape int32[]).

public Output <?> counter ()

Counter for the counter-based RNG algorithm. Since counter size is algorithm-dependent, this output will be right-padded with zeros to reach shape uint64[2] (the current maximal counter size among algorithms).

public static StatelessRandomGetKeyCounterAlg create ( Scope scope, Operand <? extends TNumber > seed)

Factory method to create a class wrapping a new StatelessRandomGetKeyCounterAlg operation.

Parameters
scope current scope
seed 2 seeds (shape [2]).
Returns
  • a new instance of StatelessRandomGetKeyCounterAlg

public Output <?> key ()

Key for the counter-based RNG algorithm (shape uint64[1]).