torchkit.utils.seed

torchkit.utils.seed.seed_rngs(seed, pytorch=True)[source]

Seed system RNGs.

Parameters
  • seed (int) – The desired seed.

  • pytorch (bool, optional) – Whether to seed the torch RNG as well. Defaults to True.

Return type

None

torchkit.utils.seed.set_cudnn(deterministic=False, benchmark=True)[source]

Set PyTorch-related CUDNN settings.

Parameters
  • deterministic (bool, optional) – Make CUDA algorithms deterministic. Defaults to False.

  • benchmark (bool, optional) – Make CUDA arlgorithm selection deterministic. Defaults to True.

Return type

None