AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'LinearRegressor'
13,363
Might be you are using older tensorflow version, as tf.estimator.LinearRegressor
included with tensorflow=1.3.0
.
upgrade your tensorflow installation
pip install --upgrade tensorflow==1.3.0
Author by
Admin
Updated on June 08, 2022Comments
-
Admin almost 2 years
import tensorflow as tf import numpy as np feature_columns = [tf.feature_column.numeric_column("x", shape=[1])] estimator = tf.estimator.LinearRegressor(feature_columns=feature_columns)
My code is above. Then it shows the error
"AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'LinearRegressor'"
Python 3.5.2