以下职能存在于Tensorflow 1.5中,目前已不再推荐。
函数的对应代码是什么:
tf.contrib.crf.crf_log_likelihood() tf.contrib.crf.viterbi_decode()
在最新的Tensorflow 2.8版本中?
发布于 2022-05-10 07:15:47
这两个函数现在都可以在Tensorflow Addons包下使用。
您可以使用下面的代码访问这些函数:
!pip install tensorflow_addons #to install tensorflow_addons package
import tensorflow_addons as tfa
tfa.text.crf_log_likelihood()
tfa.text.viterbi_decode() 有关更多细节,请查看这链接。
https://stackoverflow.com/questions/72045122
复制相似问题