Created
December 27, 2019 11:02
-
-
Save ruslangrimov/9d138a45eff06de17a532fb7cf04ec4a to your computer and use it in GitHub Desktop.
Reproducible pytorch cuda
This file contains 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
np.random.seed(42) | |
random.seed(42) | |
cudnn.benchmark = False | |
cudnn.deterministic = True | |
torch.manual_seed(42) | |
torch.cuda.manual_seed_all(42) | |
torch.set_printoptions(precision=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment