python - TensorFlow Estimator 1.3 无法获取 predict_proba?

标签 python tensorflow

我在 1.3 中看到了新的 DNN 和估计器类 (tf.estimator.DNNClassifier),但我看不到任何获取/设置 predict_proba 的方法。

所以到目前为止,对于我猜的二元情况,预测设置为 true 超过 .5%,如果低于 .5% 则设置为 false。但是有许多用例,其中预测为 true 的概率较低,非常有用,特别是非常不平衡的数据?

有什么建议或线索吗?还是指导?

顺便说一句,它可以在这里找到: 类 tf.contrib.learn.DNNClassifier

最佳答案

来自 GitHub 上的 Google:您现在可以将 tf.estimator 与例如预测(..., predict_keys="概率")

https://github.com/tensorflow/tensorflow/issues/12119#issuecomment-321098690

关于python - TensorFlow Estimator 1.3 无法获取 predict_proba?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45555824/

相关文章:

python - 从标签之间提取文本的有效方法

Python程序,assign_add,结果可能有点困惑

TensorFlow:读取卡住的模型,添加操作,然后保存到新的卡住模型

android - Android Tensorflow Lite C++ .SO库未在运行时链接

python - 神经网络验证准确性有时不会改变

python - 如何将 GStreamer 消息记录到文件中

python:替代匿名函数

tensorflow - TensorFlow 作业是否默认使用多个内核?

machine-learning - 选择 GeForce 或 Quadro GPU 通过 TensorFlow 进行机器学习

python - 通过串口发送和接收