tf.random.shuffle
Randomly shuffles a tensor along its first dimension.
tf.random.shuffle(
value, seed=None, name=None
)
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]]
Args |
value
|
A Tensor to be shuffled.
|
seed
|
A Python integer. Used to create a random seed for the distribution.
See
tf.compat.v1.set_random_seed
for behavior.
|
name
|
A name for the operation (optional).
|
Returns |
A tensor of same shape and type as value , shuffled along its first
dimension.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]