Shortcuts

grl.utils

set_seed

grl.utils.set_seed(seed_value=None, cudnn_deterministic=True, cudnn_benchmark=False)[source]
Overview:

Set the random seed. If no seed value is provided, generate a random seed.

Parameters:
  • seed_value (int, optional) – The random seed to set. If None, a random seed will be generated.

  • cudnn_deterministic (bool, optional) – Whether to make cuDNN operations deterministic. Defaults to True.

  • cudnn_benchmark (bool, optional) – Whether to enable cuDNN benchmarking for convolutional operations. Defaults to False.

Returns:

The seed value used.

Return type:

seed_value (int)