Created
July 2, 2020 08:34
-
-
Save p3jitnath/84aaf07a121e9e34e749e6f54b102412 to your computer and use it in GitHub Desktop.
Seed PyTorch for Reproducibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
torch.manual_seed(42) | |
torch.backends.cudnn.deterministic = True | |
torch.backends.cudnn.benchmark = False | |
import numpy as np | |
np.random.seed(42) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment