delu.random.set_state#
- delu.random.set_state(state)[source]#
Set global random states in
random,numpyandtorch.See
get_statefor a usage example.- Parameters:
state (Dict[str, Any]) – the global RNG states. Must be produced by
get_state. The size of the liststate['torch.cuda']must be equal to the number of available cuda devices.- Return type:
None
See also
- Raises:
AssertionError – if
torch.cuda.device_count() != len(state['torch.cuda'])- Parameters:
- Return type:
None