Files
bullet3/examples/pybullet/gym/pybullet_utils/util.py
Rodrigo Queiro d18531cc6a Replace tensorflow with tf.compat.v1
This means they won't break when using TensorFlow 2.0.
2020-02-19 17:35:48 +01:00

15 lines
220 B
Python

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