mindspore/docs/api/api_python/ops/mindspore.ops.func_shuffle.rst

17 lines
571 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.shuffle
=====================
.. py:function:: mindspore.ops.shuffle(x, seed=None)
沿着Tensor第一维随机打乱数据。
参数:
- **x** (Tensor) - 需要随机打乱的Tensor。
- **seed** (int) - 随机数种子,用于生成随机数,必须为非负数。如果 `seed` 为0则替换为随机生成的值。默认值是None, 表示使用0作为随机数种子。
返回:
Tensor与输入相同的shape和类型。
异常:
- **TypeError** - 如果 `seed` 不是None或非负整数。