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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With