首页 Python python – TensorFlow:SKCompat折旧警告

python – TensorFlow:SKCompat折旧警告

注意:我在这里的第一个问题.原谅缺乏细节或信息.如果需要,非常乐意澄清. 我在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))

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/kaifa/python/20201230/14541.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部