mindspore.manual_seed

mindspore.manual_seed(seed)[source]

Set the default generator seed.

Parameters

seed (int) – Set the default generator seed.

Returns

Generator, the default generator.

Supported Platforms:

Ascend GPU CPU

Examples

>>> from mindspore import manual_seed, initial_seed
>>> manual_seed(13)
>>> print(initial_seed())
13