1

Even though I have tensorflow installed in the venv at version 2.12.0 it kinda does not have tensorflow.python.keras.layers.preprocessing. I tried to install the object-detection API and I am still struggling to get it work. Here is what I got as an error message when I tried to run the test file python object_detection/builders/model_builder_tf2_test.py. The second photo shows you what I got when I tried to run the command python -m pip install .

Some stuff works but like I said I am not able to make the test file work.enter image description hereenter image description here

I already did install visual studio 2017 because I got an error that object detection needed that and I also did everything what was written in the installement guide here https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install-coco

I tried that already the whole da so I would be really happy if somebody could help me:)

1
  • You are using the incorrect imports, do not use tensorflow.python.keras, use tensorflow.keras directly Commented May 1, 2023 at 18:00

1 Answer 1

-1

You need update your TensorFlow -

pip install tensorflow==2.7.0

for gpu version -

pip install tensorflow-gpu==2.7.0 

Have a look at this post

You can also to this link for more details

Sign up to request clarification or add additional context in comments.

7 Comments

then I get an comment with ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0) ERROR: No matching distribution found for tensorflow==2.0.0
thats because its more older version and its not supported. You can try installing version - 2.5.0. I have also modified the Answer
then I got this error message :/ ERROR: Could not find a version that satisfies the requirement tensorflow==2.5.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0)
what is the python or pip version you are using ?
I am using pip 23.1.2 and python 3.11
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.