TensorFlow

API

 tf.random / poisson


Randomly shuffles a tensor along its first dimension.

Used in the notebooks

Used in the tutorials

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]]

value A Tensor to be shuffled.
seed A Python integer. Used to create a random seed for the distribution. See tf.random.set_seed for behavior.
name A name for the operation (optional).

A tensor of same shape and type as value, shuffled along its first dimension.

此页内容是否对您有帮助