2.4K Star 8.1K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindspore.dataset.config.set_seed.rst 641 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaotianci 提交于 2023-09-21 20:56 . fix api docs

mindspore.dataset.config.set_seed

.. py:function:: mindspore.dataset.config.set_seed(seed)

    设置数据处理中的随机数生成器的种子。

    设置种子能够控制随机生成器的初始状态,起到固定随机数生成结果的目的。

    .. note::
        该接口将同时设置 `random` 、 `numpy.random` 和 `mindspore.dataset` 模块的随机种子为指定值。

    参数:
        - **seed** (int) - 想要设置的种子值。需为非负数。

    异常:
        - **TypeError** - 当 `seed` 不为int类型。
        - **ValueError** - 当 `seed` 为负数。
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891