Created
November 9, 2022 22:47
-
-
Save konverner/366861b9d8136a54a7013595adeac7ea to your computer and use it in GitHub Desktop.
fixing random seed in python
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
seed = 42 | |
torch.manual_seed(seed) | |
torch.cuda.manual_seed(seed) | |
np.random.seed(seed) | |
random.seed(seed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment