diff options
author | Chris E. Mower <chris.mower@ed.ac.uk> | 2022-02-21 15:05:16 +0000 |
---|---|---|
committer | Chris E. Mower <chris.mower@ed.ac.uk> | 2022-02-21 15:05:16 +0000 |
commit | 713392b78924e8b903ad11219cf63b78412fd1fe (patch) | |
tree | 17ea78aef1ee28a2d092788ff92f52ab3c0dbf4d | |
parent | 9eac022ffa4d46b7983db2d0e980a6a170bdff8e (diff) | |
download | bullet3-713392b78924e8b903ad11219cf63b78412fd1fe.tar.gz |
Fix import error in humanoid running examples.
Note, RuntimeError thrown when eager execution is enabled.
-rw-r--r-- | examples/pybullet/tensorflow/humanoid_running.py | 6 | ||||
-rw-r--r-- | examples/pybullet/tensorflow/humanoid_running_vr_follow.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/examples/pybullet/tensorflow/humanoid_running.py b/examples/pybullet/tensorflow/humanoid_running.py index ffd502fa3..aedbb1278 100644 --- a/examples/pybullet/tensorflow/humanoid_running.py +++ b/examples/pybullet/tensorflow/humanoid_running.py @@ -1,4 +1,8 @@ -import tf.compat.v1 as tf +try: + import tf.compat.v1 as tf +except Exception: + import tensorflow.compat.v1 as tf + tf.disable_eager_execution() import sys import numpy as np import argparse diff --git a/examples/pybullet/tensorflow/humanoid_running_vr_follow.py b/examples/pybullet/tensorflow/humanoid_running_vr_follow.py index 2df85cd88..98564c091 100644 --- a/examples/pybullet/tensorflow/humanoid_running_vr_follow.py +++ b/examples/pybullet/tensorflow/humanoid_running_vr_follow.py @@ -1,4 +1,8 @@ -import tf.compat.v1 as tf +try: + import tf.compat.v1 as tf +except Exception: + import tensorflow.compat.v1 as tf + tf.disable_eager_execution() import sys import numpy as np |