SEED_balanced / FAITH /sam /example /utility /initialize.py
Mengieong's picture
Upload 253 files
02e9762 verified
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