0

Trying to run ImageAI in Jupyter. I'm getting the following error

Using TensorFlow backend.

AttributeError Traceback (most recent call last) in ----> 1 from imageai.Detection.Custom import DetectionModelTrainer

~\anaconda3\envs\ImageAI\lib\site-packages\imageai\Detection\Custom_init_.py in 19 import cv2 20 ---> 21 tf.config.run_functions_eagerly(True) 22 os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" 23

~\anaconda3\envs\ImageAI\lib\site-packages\tensorflow_core\python\util\module_wrapper.py in getattr(self, name) 191 def getattr(self, name): 192 try: --> 193 attr = getattr(self._tfmw_wrapped_module, name) 194 except AttributeError: 195 if not self._tfmw_public_apis:

AttributeError: module 'tensorflow._api.v1.config' has no attribute 'run_functions_eagerly

What is the issue here? Thanks in advance

Shri
  • 11
  • 1

1 Answers1

1

You can try like this:

import tensorflow.compat.v1 as tf
tf.config.experimental_run_functions_eagerly(True)
@tf.function
def fn():
  # `enter code here