TensorFlow:SKCompat折旧警告 [英] TensorFlow: SKCompat Depreciation Warning
问题描述
注意:我的第一个问题在这里.请原谅缺少细节或信息.如果需要,我们很乐意澄清.
NOTE: My first question on here. Pardon for lack of details or info. More than happy to clarify if needed.
我在Mac上运行TensorFlow 1.0.0,并且在使用Learn.Estimator类时不断收到此警告
I'm running TensorFlow 1.0.0 on Mac and I keep getting this warning when using the learn.Estimator class
警告:tensorflow:来自:25:正在调用 适合(来自tensorflow.contrib.learn.python.learn.estimators.estimator) 不推荐使用y,并将在2016-12-01之后将其删除. 更新说明:Estimator与Scikit Learn分离 通过移到单独的类SKCompat中来访问界面.参数x,y和 batch_size仅在SKCompat类中可用,Estimator将 只接受input_fn.转换示例:est = Estimator(...)-> est = SKCompat(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(...))
我尝试过查找此类,关于它的信息为零.完整的代码发布在这里
I've tried looking this class up and there is zero information in regards to it. Full code is posted here
https://github.com/austinmwhaley/DeepFarm/blob/master/prototype_1.ipynb
请让我知道是否还有任何其他人需要的信息
Please let me know if there is any other info that anyone needs
推荐答案
您可以从tensorflow.contrib.learn.python导入SKCompat:
You can import SKCompat from tensorflow.contrib.learn.python:
from tensorflow.contrib.learn.python import SKCompat
然后用SKCompat()包装您的估算器,例如像这样:
And then wrap your estimator with SKCompat() e.g. like this:
classifier = SKCompat(tf.contrib.learn.LinearClassifier(args))
这篇关于TensorFlow:SKCompat折旧警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!