I am trying to install tensorflow object detection on google colab. I performed the steps as given on GitHub. But, now I am facing the proble when I am trying to test my installation, that is when I ran "!python3 object_detection/builders/model_builder_test.py" it is giving error: AttributeError: module 'tensorflow' has no attribute 'contrib'. Here is my code snippet:
%cd /content/gdrive/My Drive/TFConfig/models/research/
!protoc object_detection/protos/*.proto --python_out=.
import os
os.environ['PYTHONPATH'] += ':/content/gdrive/My Drive/TFConfig/models/research/::/content/gdrive/My Drive/TFConfig/models/research/slim/'
!python setup.py build
!python setup.py install
!python3 object_detection/builders/model_builder_test.py
It is on google colab. and I am getting the error message:
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 23, in <module>
from object_detection.builders import model_builder
File "/content/gdrive/My Drive/TFConfig/models/research/object_detection/builders/model_builder.py", line 22, in <module>
from object_detection.builders import box_predictor_builder
File "/content/gdrive/My Drive/TFConfig/models/research/object_detection/builders/box_predictor_builder.py", line 20, in <module>
from object_detection.predictors import convolutional_box_predictor
File "/content/gdrive/My Drive/TFConfig/models/research/object_detection/predictors/convolutional_box_predictor.py", line 23, in <module>
slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'
tensorflow.contrib
were contributed by people in the earlier days of tensorflow when they were missing some functionality. Later the tools were integrated into other modules. – Adomas Baliuka