From 713392b78924e8b903ad11219cf63b78412fd1fe Mon Sep 17 00:00:00 2001 From: "Chris E. Mower" Date: Mon, 21 Feb 2022 15:05:16 +0000 Subject: Fix import error in humanoid running examples. Note, RuntimeError thrown when eager execution is enabled. --- examples/pybullet/tensorflow/humanoid_running.py | 6 +++++- 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 -- cgit v1.2.1