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. """)
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
升级或降级 tensorflow-estimator 包以匹配 tensorflow 版本。
I have the same issue when I type the code below I got this error:
AttributeError: module 'tensorflow.tools.docs.doc_controls' has no attribute 'doc_private'
The code is: # modules
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
from keras.wrappers.scikit_learn import KerasClassifier
from keras.utils import np_utils
import tensorflow as tf
# for modeling
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.callbacks import EarlyStopping
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.