Error: p>
The current version of tensorflow is 1.13.1 and 2.0.0b1 report errors module ‘tensorflow.compat.v2’ has no attribute ‘contrib’,
try to import tensorflow.compat.v1 as tf instead of import tensorflow as tf,
But ImportError cannot import name ‘auto’
p>
Solution:
as shown in the figure below, refer to article 1 to point out that tf2.0 alpha began to remove tf.contrib and needed to be upgraded.
therefore, upgrade to tensorflow 2.1.0 using PIP install –upgrade tensorflow.
p>
p>
p>
p>
p>
reference article:
p>
1. https://stackoverflow.com/questions/55870127/module-tensorflow-has-no-attribute-contrib
p>
Read More:
- Solve the problem of using in tensoft 2. X tf.contrib.slim No module named appears in the package: tensorflow.contrib problem
- module ‘tensorflow_core._api.v2.train’ has no attribute ‘slice_input_producer’
- Tensorflow error: module ‘tensorflow’ has no attribute ‘xxx’
- Tensorflow error: attributeerror: module ‘tensorflow’ has no attribute ‘unpack’ (‘pack ‘)
- module ‘tensorflow‘ has no attribute ‘placeholder‘
- Tensorflow reported an error when using session module: attributeerror: module ‘tensorflow’ has no attribute ‘session’, which has been solved
- Attributeerror: module tensorflow no attribute app solution
- Record a problem of no module named ‘tensorflow. Examples’ and’ tensorflow. Examples. Tutorials’ in tensorflow 2.0
- Attributeerror: ‘module’ object has no attribute ‘handlers’ — Python sub module import problem
- Problem solving: importerror: libcublas.so .9.0: cannot open shared object file: No such file
- After tensorflow installation, an error occurred while importing: importerror: DLL load failed: the specified module could not be found
- To solve the problem of importerror when installing tensorflow: libcublas.so . 10.0, failed to load the native tensorflow runtime error
- Solving attributeerror: module ‘Matplotlib’ has no attribute ‘artist’
- Tensorflow operation report error modulenotfounderror: no module named ‘tensorflow. Python. Types’ solution
- Tensorflow import error: DLL load failed: the specified module could not be found
- Solving attributeerror: module ‘urllib’ has no attribute ‘request’
- Android studio auto import auto import
- Importerror of Django error: no module named**
- Solving attributeerror: module ‘Matplotlib’ has no attribute ‘plot‘
- How to solve “import cv2 failed ImportError: DLL load fail: Cannot find the specified module” in Anaconda environment