pneuma-pygame/utils/seeds.py

12 lines
184 B
Python
Raw Permalink Normal View History

2024-05-16 23:15:22 +00:00
import random
import torch as T
import numpy as np
def set_seeds(value):
random.seed(value)
np.random.seed(value)
T.manual_seed(value)
T.cuda.manual_seed_all(value)