pyqit.set_seed#
- pyqit.set_seed(seed: int) int[source]#
Set the seed.
Seeds numpy and torch when it is installed.
- Parameters:
seed (int) – Value applied to every supported RNG.
- Returns:
The seed that was applied.
- Return type:
int
Notes
This mutates global RNG state, the same contract as Lightning’s
seed_everything.Trainer.fitcalls it for you; call it yourself before constructing a model if you also want its initial weights to be reproducible, since those are drawn at construction time.