Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qujinqiang opened this issue Jan 5, 2018 · 1 comment
Open

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

qujinqiang opened this issue Jan 5, 2018 · 1 comment

Comments

@qujinqiang
Copy link

接入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
Copy link
Owner

Slyne commented Jan 9, 2018

参照这个函数的文档吧
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants