Slyne / tf_tagging

这是一个tensorflow使用的样例,改自于https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html
37 stars 26 forks source link

精准度这个指标怎么获取? #1

Open qujinqiang opened 6 years ago

qujinqiang commented 6 years ago

接入crf层后,首先不太清楚 log_likelihood输出究竟是什么,那么怎么获取精准度这个指标呢?@Slyne if self.config.crf: log_likelihood, self.transition_params = tf.contrib.crf.crf_log_likelihood( self.logits, self.labels, self.sequence_lengths) self.loss = tf.reduce_mean(-log_likelihood)

Slyne commented 6 years ago

参照这个函数的文档吧 https://www.tensorflow.org/api_docs/python/tf/contrib/crf/crf_log_likelihood Returns: log_likelihood: A scalar containing the log-likelihood of the given sequence of tag indices. transition_params: A [num_tags, num_tags] transition matrix. This is either provided by the caller or created in this function.