seed_all (original) (raw)

Back to top

Edit this page

Toggle table of contents sidebar

composer.utils.reproducibility.seed_all(seed)[source]#

Seed all rng objects.

Note

When using the Trainer, you can use the seed parameter instead of invoking this function directly. For example:

trainer = Trainer(seed=42)

However, to configure the random seed for operations before the trainer is initialized, manually invoke this function at the beginning of your training script.

Parameters

seed (int) – The random seed