Created
December 8, 2019 11:32
-
-
Save KirillVladimirov/005ec7f762293d2321385580d3dbe335 to your computer and use it in GitHub Desktop.
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
| def seed_everything(seed=1234): | |
| random.seed(seed) | |
| os.environ['PYTHONHASHSEED'] = str(seed) | |
| np.random.seed(seed) | |
| torch.manual_seed(seed) | |
| torch.cuda.manual_seed(seed) | |
| torch.backends.cudnn.deterministic = True | |
| seed_everything() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment