0

About OC: Ubuntu 16.04 LTS x86_64; GRX CUDA 10.2; cudnn ... etc.

TF: 2.1.0; Python 3.6

About the problem: When I launch module_main.py an error is displayed. When I launch it /legacy/train.py similarly, an error appears. Is it possible to fix this problem without downgrading the tensorflow version and without reinstalling the drivers? Is changing the code via a script the only way?

Logs below:

model_main.py
Traceback (most resent call last):
    File "models/research/object_detection/model_main.py", 
line 26, in <module> from object_detection import model_lib
    File "/root/ObjectDetection/models/research/object_detection/model_lib.py" 
line 27, in <module> from object_detection import eval_lib
    File "/root/ObjectDetection/models/research/object_detection/eval_util.py", 
line 40, in <module> slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'

Also using conda env thx, for some advice

1
  • UPD(1): after using tf_upgrade_v2 the error remains the same Commented May 2, 2020 at 18:22

1 Answer 1

2

I faced the same issue. Tensorflow 2.0 has removed tf.contrib. I tried to fixed the error by changing the code. And it lead to many other error. I fixed this issue by downgrading tensorflow to 1.14.0 Run these commands on terminal: pip uninstall tensorflow pip install tensorflow==1.14.0

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

1 Comment

I tried to do this, but conda env says an error due to the driver CUDA v10.2 can i downgrade drivers only by deleting them first?

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.