繁体   English   中英

最新 tensorflow 版本 2.8 中 tf.contrib.crf.crf_log_likelihood 的代码片段是什么

[英]What's code snippet of tf.contrib.crf.crf_log_likelihood in latest tensorflow version 2.8

Tensorflow 1.5 中存在以下功能,目前已弃用。

function对应的代码是什么:

tf.contrib.crf.crf_log_likelihood()

tf.contrib.crf.viterbi_decode()

在最新的Tensorflow 2.8版本?

这两个功能现在都可以在Tensorflow Addons package 下使用。

您可以使用以下代码访问这些功能:

!pip install tensorflow_addons     #to install tensorflow_addons package
import tensorflow_addons as tfa  

tfa.text.crf_log_likelihood()
tfa.text.viterbi_decode() 

请检查链接以获取更多详细信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM