Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'tensorflow.contrib' #34

Open
ssineee opened this issue Jun 28, 2022 · 1 comment
Open

ModuleNotFoundError: No module named 'tensorflow.contrib' #34

ssineee opened this issue Jun 28, 2022 · 1 comment

Comments

@ssineee
Copy link

ssineee commented Jun 28, 2022

Hey, i have a problem with tensorflow's versions and everytime i run this :

import os
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as viz_utils
from object_detection.builders import model_builder

print(CONFIG_PATH)

I get this error :

ModuleNotFoundError Traceback (most recent call last)
in
2 from object_detection.utils import label_map_util
3 from object_detection.utils import visualization_utils as viz_utils
----> 4 from object_detection.builders import model_builder
5
6 print(CONFIG_PATH)

~/.local/lib/python3.6/site-packages/object_detection/builders/model_builder.py in
27 from object_detection.builders import image_resizer_builder
28 from object_detection.builders import losses_builder
---> 29 from object_detection.builders import matcher_builder
30 from object_detection.builders import post_processing_builder
31 from object_detection.builders import region_similarity_calculator_builder as sim_calc

~/.local/lib/python3.6/site-packages/object_detection/builders/matcher_builder.py in
21
22 if tf_version.is_tf1():
---> 23 from object_detection.matchers import bipartite_matcher # pylint: disable=g-import-not-at-top
24
25

~/.local/lib/python3.6/site-packages/object_detection/matchers/bipartite_matcher.py in
18 import tensorflow.compat.v1 as tf
19
---> 20 from tensorflow.contrib.image.python.ops import image_ops
21 from object_detection.core import matcher
22

ModuleNotFoundError: No module named 'tensorflow.contrib'

Please Help

@FardinHash
Copy link

If your Tensorflow version is 2.0 then downgrade the Tensorflow version to 1.15, because tf.contrib is no longer in version 2.0
use- pip install tensorflow==1.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants