T - data type for output() output@Operator public final class RandomShuffle<T> extends PrimitiveOp implements Operand<T>
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]]
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomShuffle.Options
Optional attributes for
RandomShuffle |
operation| Modifier and Type | Method and Description |
|---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T> RandomShuffle<T> |
create(Scope scope,
Operand<T> value,
RandomShuffle.Options... options)
Factory method to create a class to wrap a new RandomShuffle operation to the graph.
|
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) |
equals, hashCode, toStringpublic static <T> RandomShuffle<T> create(Scope scope, Operand<T> value, RandomShuffle.Options... options)
scope - current graph scopevalue - The tensor to be shuffled.options - carries optional attributes valuespublic static RandomShuffle.Options seed(Long seed)
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)
seed2 - A second seed to avoid seed collision.public Output<T> output()
public Output<T> asOutput()
OperandInputs 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.
asOutput in interface Operand<T>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.