pneuma-pygame/PyGame/utils/seeds.py
2024-05-17 01:15:22 +02:00

11 lines
184 B
Python

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)