홍채 꽃 데이터 세트를위한 간단한 분류자를 작성하기 위해 Siraj Raval의 YouTube 비디오를 따르고 있습니다. 이 비디오는 2016 년 5 월에 공개되었으므로 업데이트 된 Tensorflow의 일부 영역이 있다고 확신합니다. "tf.train.get.global_step으로 전환하십시오. 나는 구식의 Tensorflow 라이브러리에서 일하고 있으며, feature_columns를 연구하여 새 것을 알아 내려고 노력했다. . 오류가 어떤 도움을 크게 감사합니다 계속하고 교육 Tensorflow 사용자가되기에 어떤 조언은 공개적으로 환영합니다 여기 Tensorflow 분류 예에서 tf.train.get.global_step 오류가 발생했습니다
내 코드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)
입니다 그리고 여기에 오류이다.
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
감사 사전에 도움을 청합니다.