This commit is contained in:
Glenn Jocher
2019-06-24 13:43:17 +02:00
parent 57b616b8b1
commit 0005823d1f
2 changed files with 5 additions and 4 deletions
+2
View File
@@ -5,6 +5,8 @@ def init_seeds(seed=0):
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.benchmark = True # set False for reproducible resuls
# torch.backends.cudnn.deterministic = True # https://pytorch.org/docs/stable/notes/randomness.html
def select_device(force_cpu=False):