torch_ecg.utils.seed_everything#
- torch_ecg.utils.seed_everything(seed: int) None[source]#
Seed all random number generators used by
torch_ecg(and by the libraries it relies on).This is an alias of
DEFAULTS.set_seed: it (re)createsDEFAULTS.RNG(numpy.random.Generator), and seeds the globalrandomandnumpy.randomstates and thetorch(CPU and CUDA) generators.- Parameters:
seed (int) – The seed to be set.
Examples
from torch_ecg.utils import seed_everything seed_everything(42)