RandomShuffle

public final class RandomShuffle

Randomly shuffles a tensor along its first dimension.

The tensor is shuffled along dimension 0, such that each `value[j]` is mapped to one and only one `output[i]`. For example, a mapping that might occur for a 3x2 tensor is:

[[1, 2],       [[5, 6],
  [3, 4],  ==>   [1, 2],
  [5, 6]]        [3, 4]]
 

Nested Classes

class RandomShuffle.Options Optional attributes for RandomShuffle

Constants

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

Public Methods

Output <T>
asOutput ()
Returns the symbolic handle of the tensor.
static <T extends TType > RandomShuffle <T>
create ( Scope scope, Operand <T> value, Options... options)
Factory method to create a class wrapping a new RandomShuffle operation.
Output <T>
output ()
A tensor of same shape and type as `value`, shuffled along its first dimension.
static RandomShuffle.Options
seed (Long seed)
static RandomShuffle.Options
seed2 (Long seed2)

Inherited Methods

Constants

public static final String OP_NAME

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

Constant Value: "RandomShuffle"

Public Methods

public Output <T> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static RandomShuffle <T> create ( Scope scope, Operand <T> value, Options... options)

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

Parameters
scope current scope
value The tensor to be shuffled.
options carries optional attributes values
Returns
  • a new instance of RandomShuffle

public Output <T> output ()

A tensor of same shape and type as `value`, shuffled along its first dimension.

public static RandomShuffle.Options seed (Long seed)

Parameters
seed 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.

public static RandomShuffle.Options seed2 (Long seed2)

Parameters
seed2 A second seed to avoid seed collision.