加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – TensorFlow:SKCompat折旧警告

发布时间:2020-12-16 23:23:37 所属栏目:Python 来源:网络整理
导读:注意:我在这里的第一个问题.原谅缺乏细节或信息.如果需要,非常乐意澄清. 我在Mac上运行TensorFlow 1.0.0并且在使用learn.Estimator类时我一直收到此警告 WARNING:tensorflow:From :25: calling fit (from tensorflow.contrib.learn.python.learn.estimators
注意:我在这里的第一个问题.原谅缺乏细节或信息.如果需要,非常乐意澄清.

我在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))

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读