add DeepMimic helper utils
This commit is contained in:
13
examples/pybullet/gym/pybullet_utils/util.py
Normal file
13
examples/pybullet/gym/pybullet_utils/util.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user