【问题标题】:CRF in tensorflow keras?张量流keras中的CRF?
【发布时间】:2021-01-03 00:27:08
【问题描述】:

我知道 Keras-contrib 已弃用并已迁移到 tensorflow/addons,但我不明白如何使用这个新库添加 CRF 层。

有谁知道哪个 tensorflow/addons 功能相当于 keras-contrib CRF 层?

【问题讨论】:

    标签: python tensorflow machine-learning


    【解决方案1】:

    您可以使用 TensorFlow 插件(tfa)。在你的情况下使用tfa.layers.CRF

    要使用上面的,首先你必须安装最新版本,如下所示

    pip install tensorflow-addons
    

    您可以使用如下所示的插件

    import tensorflow as tf
    import tensorflow_addons as tfa
    from tensorflow_addons.layers import CRF
    

    更多信息可以参考here

    【讨论】:

      猜你喜欢
      • 2020-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多