Open qujinqiang opened 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.
接入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)