PyTorch 2 · Performance

Make runs reproducible

Set the random seed for repeatable results.

torch.manual_seed(42)

Official PyTorch 2 documentation

More performance commands

All performance commands · PyTorch 2 cheatsheet

Was this page helpful?