bullet3/examples/pybullet/gym/pybullet_utils/util.py
2019-04-27 07:31:15 -07:00

15 lines
218 B
Python

import random
import numpy as np
def set_global_seeds(seed):
try:
import tensorflow as tf
except ImportError:
pass
else:
tf.set_random_seed(seed)
np.random.seed(seed)
random.seed(seed)
return