Home > Back-end >  Module 'tensorflow.tools.docs.doc_controls' has no attribute 'inheritable_header'
Module 'tensorflow.tools.docs.doc_controls' has no attribute 'inheritable_header'

Time:11-02

Running estimator from tensorflow today and came up with this error, any idea how to solve it?

File "C:\Users\ASUS Laptop\anaconda3\envs\tf_gpu\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 70, in <module>
    @doc_controls.inheritable_header("""\
AttributeError: module 'tensorflow.tools.docs.doc_controls' has no attribute 'inheritable_header'

This is in my estimator.py file: @doc_controls.inheritable_header("""
Warning: Estimators are not recommended for new code. Estimators run v1.Session-style code which is more difficult to write correctly, and can behave unexpectedly, especially when combined with TF 2 code. Estimators do fall under our compatibility guarantees, but will receive no fixes other than security vulnerabilities. See the migration guide for details. """)

CodePudding user response:

check your "tensorflow-estimator" version, it seems that version 2.7 from the 30 of October not compatible with some libraries

try version 2.6:

pip install --upgrade tensorflow-estimator==2.6.0

CodePudding user response:

Either upgrade or downgrade tensorflow-estimator package to match tensorflow version.

  • Related