pupilsense / preprocessing /dataset_creation_utils.py
vijul.shah
Added Suport for Sample Library
7ee620d
raw
history blame contribute delete
329 Bytes
import os
import torch
import random
import numpy as np
def seed_everything(seed=42):
random.seed(seed)
os.environ["PYTHONHASHSEED"] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = True