Module 'tensorflow' has no attribute 'contrib'

Ömer Çiftci

I am trying to train my own custom object detector using Tensorflow Object-Detection-API

I installed the tensorflow using "pip install tensorflow" in my google compute engine. Then I followed all the instructions on this site: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html

When I try to use train.py I am getting this error message:

Traceback (most recent call last): File "train.py", line 49, in from object_detection.builders import dataset_builder File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1->py3.6.egg/object_detection/builders/dataset_builder.py", line 27, in from object_detection.data_decoders import tf_example_decoder File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/data_decoders/tf_example_decoder.py", line 27, in slim_example_decoder = tf.contrib.slim.tfexample_decoder AttributeError: module 'tensorflow' has no attribute 'contrib'

Also I am getting different results when I try to learn version of tensorflow.

python3 -c 'import tensorflow as tf; print(tf.version)' : 2.0.0-dev20190422

and when I use

pip3 show tensorflow:

Name: tensorflow Version: 1.13.1 Summary: TensorFlow is an open source machine learning framework for everyone. Home-page: https://www.tensorflow.org/ Author: Google Inc. Author-email: [email protected] License: Apache 2.0 Location: /usr/local/lib/python3.6/dist-packages Requires: gast, astor, absl-py, tensorflow-estimator, keras-preprocessing, grpcio, six, keras-applications, wheel, numpy, tensorboard, protobuf, termcolor Required-by:

    sudo python3 train.py --logtostderr --train_dir=training/ -- 
    pipeline_config_path=training/ssd_inception_v2_coco.config

What should I do to solve this problem? I couldn't find anything about this error message except this: tensorflow 'module' object has no attribute 'contrib'

mlneural03

tf.contrib has moved out of TF starting TF 2.0 alpha.
Take a look at these tf 2.0 release notes https://github.com/tensorflow/tensorflow/releases/tag/v2.0.0-alpha0
You can upgrade your TF 1.x code to TF 2.x using the tf_upgrade_v2 script https://www.tensorflow.org/alpha/guide/upgrade

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Tensorflow 2.0 - AttributeError: module 'tensorflow' has no attribute 'Session'

From Java

AttributeError: module 'tensorflow.io' has no attribute 'experimental'

From Java

AttributeError: 'datetime' module has no attribute 'strptime'

From Java

'module' has no attribute 'urlencode'

From Java

tensorflow:AttributeError: 'module' object has no attribute 'mul'

From Java

How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"?

From Java

module 'tensorflow' has no attribute 'logging'

From Dev

'module' object has no attribute 'GeoSQLCompiler'

From Dev

'module' object has no attribute 'DataFrame'

From Dev

AttributeError: 'module' object has no attribute

From Dev

AttributeError: 'module' object has no attribute

From Dev

AttributeError: 'module' object has no attribute

From Dev

module object has no attribute oauth

From Dev

'module' object has no attribute 'Serial'

From Dev

'module' object has no attribute 'get'?

From Dev

Custom Module - Object Has No Attribute

From Dev

While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute 'gfile'

From Dev

TensorFlow, "'module' object has no attribute 'placeholder'"

From Dev

TensorFlow has no attribute "with_dependencies"

From Dev

What is the purpose of the tf.contrib module in Tensorflow?

From Dev

tensorflow 'module' object has no attribute 'contrib'

From Dev

module' object has no attribute 'SelectDateWidget'

From Dev

tensorflow:AttributeError: 'module' object has no attribute 'mul'

From Dev

What is the purpose of the tf.contrib module in Tensorflow?

From Dev

Tensorflow 2.0 - AttributeError: module 'tensorflow' has no attribute 'Session'

From Dev

Python Websockets Module has no attribute

From Dev

module 'tensorflow.python.keras.api._v2.keras.layers' has no attribute 'CuDNNLSTM'

From Dev

How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"?

From Dev

AttributeError: module 'tensorflow' has no attribute 'name_scope' with Keras

Related Related

  1. 1

    Tensorflow 2.0 - AttributeError: module 'tensorflow' has no attribute 'Session'

  2. 2

    AttributeError: module 'tensorflow.io' has no attribute 'experimental'

  3. 3

    AttributeError: 'datetime' module has no attribute 'strptime'

  4. 4

    'module' has no attribute 'urlencode'

  5. 5

    tensorflow:AttributeError: 'module' object has no attribute 'mul'

  6. 6

    How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"?

  7. 7

    module 'tensorflow' has no attribute 'logging'

  8. 8

    'module' object has no attribute 'GeoSQLCompiler'

  9. 9

    'module' object has no attribute 'DataFrame'

  10. 10

    AttributeError: 'module' object has no attribute

  11. 11

    AttributeError: 'module' object has no attribute

  12. 12

    AttributeError: 'module' object has no attribute

  13. 13

    module object has no attribute oauth

  14. 14

    'module' object has no attribute 'Serial'

  15. 15

    'module' object has no attribute 'get'?

  16. 16

    Custom Module - Object Has No Attribute

  17. 17

    While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute 'gfile'

  18. 18

    TensorFlow, "'module' object has no attribute 'placeholder'"

  19. 19

    TensorFlow has no attribute "with_dependencies"

  20. 20

    What is the purpose of the tf.contrib module in Tensorflow?

  21. 21

    tensorflow 'module' object has no attribute 'contrib'

  22. 22

    module' object has no attribute 'SelectDateWidget'

  23. 23

    tensorflow:AttributeError: 'module' object has no attribute 'mul'

  24. 24

    What is the purpose of the tf.contrib module in Tensorflow?

  25. 25

    Tensorflow 2.0 - AttributeError: module 'tensorflow' has no attribute 'Session'

  26. 26

    Python Websockets Module has no attribute

  27. 27

    module 'tensorflow.python.keras.api._v2.keras.layers' has no attribute 'CuDNNLSTM'

  28. 28

    How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"?

  29. 29

    AttributeError: module 'tensorflow' has no attribute 'name_scope' with Keras

HotTag

Archive