MoMask-test / utils /fixseed.py
andrewatef's picture
Upload folder using huggingface_hub
823807d verified
raw
history blame
351 Bytes
import numpy as np
import torch
import random
def fixseed(seed):
torch.backends.cudnn.benchmark = False
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
# SEED = 10
# EVALSEED = 0
# # Provoc warning: not fully functionnal yet
# # torch.set_deterministic(True)
# torch.backends.cudnn.benchmark = False
# fixseed(SEED)