Datasets:
File size: 312 Bytes
02e9762 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import random
import torch
def initialize(args, seed: int):
random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.enabled = True
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = False
|