【问题标题】:Use a model output as a conditional probability distribution in TensorFlow probability使用模型输出作为 TensorFlow 概率中的条件概率分布
【发布时间】:2019-11-28 04:45:49
【问题描述】:

我正在 TensorFlow 概率中实现贝叶斯网络来模拟不同 ML 模型之间的交互。假设这些模型是作为 TensorFlow Estimator 构建的。给定输入数据的类的条件概率然后由估计器简单地建模。

TensorFlow 概率中有没有办法包装估计器,以便我可以将其视为分布?

【问题讨论】:

    标签: python tensorflow probability


    【解决方案1】:

    我们没有太多与 Estimators API 直接互操作的方式,但您可能想看看 tfp.layers,它包含一组 Keras Layers,其输出为 TFP Distribution对象。有一堆预定义的,还有一个 DistributionLambda 层,您可以使用它来构建和输出您自己的 Distribution 实例,例如 Keras Sequential 模型的最后一层。有一些 colabs 有很好的例子 here (regression)here (variational autoencoder)

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-06-07
      • 2019-03-17
      • 1970-01-01
      • 2019-02-26
      • 1970-01-01
      • 2017-11-02
      • 1970-01-01
      相关资源
      最近更新 更多