speechbrain.utils.seed module
Seed utilities for reproducibility.
- Authors
Adel Moumen 2024
Summary
Functions:
Function that sets the seed for pseudo-random number generators in: torch, numpy, and Python's random module. |
Reference
- speechbrain.utils.seed.seed_everything(seed: int = 0, verbose: bool = True, deterministic: bool = False) int [source]
Function that sets the seed for pseudo-random number generators in: torch, numpy, and Python’s random module. Important note on DDP: all DDP process have the same seed. This is important to ensure that parameters without a require_grad set to True are the same across processes. This must be taken into account if one wants to build a custom data sampler as the processes would pick the same samples… SpeechBrain takes care of that internally.