AttributeError: module 'tensorflow' has no attribute 'contrib'
Hello, I am using TFOD API for custom object detection.
While during last step of installation verification. After, Running following command -
!python object_detection/builders/model_builder_tf2_test.py
I faced following error. How to resolve this issue ?
2024-05-26 11:06:06.451631: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-26 11:06:06.451702: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-26 11:06:06.454451: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-05-26 11:06:07.882734: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "/content/drive/MyDrive/Tf_Raj/models/research/object_detection/builders/model_builder_tf2_test.py", line 24, in
I am currently using Google Colab. Tensorflow version = 2.15.0 and I followed this documentation - https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html Pls help Thank You.
Try:
pip install tf_slim
and change the import to:
import tf_slim as slim
tf.contrib is depreciated.