Skip to content

Instantly share code, notes, and snippets.

@p3jitnath
Created July 2, 2020 08:34
Show Gist options
  • Save p3jitnath/84aaf07a121e9e34e749e6f54b102412 to your computer and use it in GitHub Desktop.
Save p3jitnath/84aaf07a121e9e34e749e6f54b102412 to your computer and use it in GitHub Desktop.
Seed PyTorch for Reproducibility
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