set_cuda_rng_state

paddle. set_cuda_rng_state ( state_list ) [source]

Sets generator state for all cuda generators.

Parameters

state_list (list|tuple) – The cuda states to set back to cuda generators. state_list is obtained from get_cuda_rng_state().

Returns

None.

Examples

>>> import paddle
>>> sts = paddle.get_cuda_rng_state()
>>> paddle.set_cuda_rng_state(sts)