mindspore.set_rng_state

View Source On Gitee
mindspore.set_rng_state(state)[source]

Set the state of the default generator.

Parameters

state (Tensor) – the target state

Supported Platforms:

Ascend GPU CPU

Examples

>>> from mindspore import set_rng_state, get_rng_state
>>> state = get_rng_state()
>>> set_rng_state(state)