T
- data type for output
output@Operator(group="random") public final class RandomShuffle<T extends TType> extends RawOp implements Operand<T>
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.Inputs<T extends TType> |
static class |
RandomShuffle.Options
Optional attributes for
RandomShuffle |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
RandomShuffle(Operation operation) |
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of the tensor.
|
static <T extends TType> |
create(Scope scope,
Operand<T> value,
RandomShuffle.Options... options)
Factory method to create a class wrapping a new RandomShuffle operation.
|
Output<T> |
output()
Gets output.
|
static RandomShuffle.Options |
seed(Long seed)
Sets the seed option.
|
static RandomShuffle.Options |
seed2(Long seed2)
Sets the seed2 option.
|
public static final String OP_NAME
public RandomShuffle(Operation operation)
@Endpoint(describeByClass=true) public static <T extends TType> RandomShuffle<T> create(Scope scope, Operand<T> value, RandomShuffle.Options... options)
T
- data type for RandomShuffle
output and operandsscope
- current scopevalue
- The tensor to be shuffled.options
- carries optional attribute 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()
value
, shuffled along its first
dimension.public Output<T> asOutput()
Operand
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.
asOutput
in interface Operand<T extends TType>
OperationBuilder.addInput(Output)
Copyright © 2015–2022. All rights reserved.