注意:我的第一个问题在这里。请原谅缺乏细节或信息。如果需要,非常乐意澄清。
我在 Mac 上运行 TensorFlow 1.0.0,并且在使用 learn.Estimator 类时不断收到此警告
WARNING:tensorflow:From :25: calling 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(...))
我已经尝试查找此类,但相关信息为零。完整代码贴在这里
https://github.com/austinmwhaley/DeepFarm/blob/master/prototype_1.ipynb
如果有任何人需要任何其他信息,请告诉我
最佳答案
您可以从 tensorflow.contrib.learn.python 导入 SKCompat:
from tensorflow.contrib.learn.python import SKCompat
然后用 SKCompat() 包装你的估计器,例如像这样:
classifier = SKCompat(tf.contrib.learn.LinearClassifier(args))
关于python - TensorFlow:Compat 弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42451062/