#include <random_ops.h>
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]]
Arguments:
Optional attributes (see Attrs
):
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.Returns:
Output
: A tensor of same shape and type as value
, shuffled along its first dimension. Constructors and Destructors | |
---|---|
RandomShuffle(const ::tensorflow::Scope & scope, ::tensorflow::Input value) | |
RandomShuffle(const ::tensorflow::Scope & scope, ::tensorflow::Input value, const RandomShuffle::Attrs & attrs) |
Public attributes | |
---|---|
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
Seed(int64 x) | |
Seed2(int64 x) |
Structs | |
---|---|
tensorflow::ops::RandomShuffle::Attrs | Optional attribute setters for RandomShuffle. |
::tensorflow::Output output
RandomShuffle( const ::tensorflow::Scope & scope, ::tensorflow::Input value )
RandomShuffle( const ::tensorflow::Scope & scope, ::tensorflow::Input value, const RandomShuffle::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs Seed( int64 x )
Attrs Seed2( int64 x )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/random-shuffle.html