I am following Siraj Raval's YouTube video for building a simple classifier for the iris flower data set. The video was dated May of 2016 so I am sure that there are some areas of Tensorflow that have been updated. I am getting an error that says "please switch to tf.train.get.global_step. I am working off of the older dated Tensorflow library and I have tried figuring out the new one by researching feature_columns. I thought this would fix it but the error persists. Any help is greatly appreciated and any advice on becoming an educated Tensorflow user is openly welcome.
Here is my code
import tensorflow.contrib.learn as skflow
from sklearn import datasets, metrics
iris = datasets.load_iris()
feature_columns = skflow.infer_real_valued_columns_from_input(iris.data)
classifier = skflow.LinearClassifier(feature_columns=feature_columns, n_classes=3)
classifier.fit(iris.data, iris.target)
score = metrics.accuracy_score(iris.target, classifier.predict(iris.data))
print("Accuracy: %f" % score)
And here is the error:
WARNING:tensorflow:float64 is not supported by many models, consider casting to float32.
WARNING:tensorflow:Using temporary folder as model directory: C:\Users\isaia\AppData\Local\Temp\tmp8be6vyhq
WARNING:tensorflow:From C:/Users/isaia/PycharmProjects/untitled5/ml.py:10: calling BaseEstimator.fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with x is deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
est = Estimator(...) -> est = SKCompat(Estimator(...))
WARNING:tensorflow:From C:/Users/isaia/PycharmProjects/untitled5/ml.py:10: calling BaseEstimator.fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with y is deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
est = Estimator(...) -> est = SKCompat(Estimator(...))
WARNING:tensorflow:float64 is not supported by many models, consider casting to float32.
WARNING:tensorflow:From C:\Users\isaia\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\linear.py:173: get_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.get_global_step
Thank you in advance for your help