Shortcuts

torchtnt.utils.env.seed

torchtnt.utils.env.seed(seed: int, deterministic: Optional[Union[str, int]] = None) None

Function that sets seed for pseudo-random number generators across commonly used libraries.

This seeds PyTorch, NumPy, and the python.random module. For more details, see https://pytorch.org/docs/stable/notes/randomness.html.

Parameters:
Raises:

ValueError – If the input seed value is outside the required range.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources