AttributeError: module 'tensorflow' has no attribute 'contrib'

See original GitHub issue

Bug report for Colab: http://colab.research.google.com/.

  • Describe the current behavior: While run !apt-get install protobuf-compiler python-pil python-lxml python-tk !pip install Cython !git clone https://github.com/tensorflow/models.git %cd /content/models/research !protoc object_detection/protos/*.proto --python_out=. %set_env PYTHONPATH=/content/models/research:/content/models/research/slim !python object_detection/builders/model_builder_test.py Suddenly shows AttributeError: module 'tensorflow' has no attribute 'contrib'.

98

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
jfsnycommented, Mar 20, 2020

I’m not sure what you mean. tf.contrib was dropped from 2.x: https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md

we as colab team don’t control what tensorflow team does, and that decision was made in 2018

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module 'tensorflow' has no attribute 'contrib' - Stack Overflow
This raises an error: module 'tensorflow_estimator.python.estimator.api._v1.estimator' has no attribute 'layers' because the old behavior was: ...
Read more >
attributeerror: module tensorflow has no attribute contrib
Attributeerror : module tensorflow has no attribute contrib error mainly occurs because of version incompatibility of tf.contrib module.
Read more >
AttributeError: module tensorflow has no attribute contrib #7767
Please check if your PYTHONPATH is set. If it is not set, you can get this error of 'has no attribute 'contrib''. In...
Read more >
Fix AttributeError: module 'tensorflow' has no attribute 'contrib'
Fix AttributeError : module ' tensorflow' has no attribute 'contrib ' ,Tensorflow object detection apiImportError: cannot import name ...
Read more >
AttributeError: module 'tensorflow' has no attribute 'contrib'
This error occurs because the contrib module has been removed from version 2 of tensorflow. There are two solutions to this problem:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found