EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

ModuleNotFoundError: No module named 'tensorflow.compat'

loppac opened this issue · 1 comments

Trying the tutorial, and getting this error. Please help, thanks!

ModuleNotFoundError Traceback (most recent call last)
Cell In[4], line 1
----> 1 from object_detection.utils import ops as utils_ops
2 from object_detection.utils import label_map_util
3 from object_detection.utils import visualization_utils as vis_util

File ~\anaconda3\envs\OD\lib\site-packages\object_detection-0.1-py3.10.egg\object_detection\utils\ops.py:27
25 from six.moves import range
26 from six.moves import zip
---> 27 import tensorflow.compat.v1 as tf
28 import tf_slim as slim
29 from object_detection.core import standard_fields as fields

ModuleNotFoundError: No module named 'tensorflow.compat'

Seems that compat is no longer available in tensorflow 2.13. I had to switch from 2.13 to 2.10 which the code run through without error.