RandomShuffle
tensorflow C++ API
tensorflow::ops::RandomShuffle
Randomly shuffles a tensor along its first dimension.
Summary
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]] ```
Arguments:
- scope: A Scope object
- value: The tensor to be shuffled.
Optional attributes (see Attrs
):
- seed: If either
seed
orseed2
are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed. - seed2: A second seed to avoid seed collision.
Returns:
Output
: A tensor of same shape and type asvalue
, shuffled along its first dimension.
RandomShuffle block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_random.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input shape: connect Input node.
- DataType dtype: Input DataType in value. ex)DT_DOUBLE;
- RandomShuffle ::Attrs attrs : Input attrs in value. ex) seed_ = 0;seed2_ = 0;
Return:
- Output output : Output object of RandomNormal class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.