How to implement sentence-level log-likelihood in tensorflow?
<p>I want to implement the sentence-level log-likelihood as described in 
<a href="https://arxiv.org/pdf/1103.0398v1.pdf" rel="noreferrer">Collobert et al.</a>, p. 14.  </p>

<p>To compute transition scores, I could use CRF, but I don't know how to integrate it in tensorflow. I thought about using 
<a href="https://www.tensorflow.org/versions/r0.11/api_docs/python/contrib.crf.html#CrfForwardRnnCell" rel="noreferrer">tf.contrib.crf.CrfForwardRnnCell</a> to compute transition scores, but this class returns a <strong>pair</strong> of [batch_size, num_tags] matrices values containing the new alpha values and not as I would expect one [batch_size, num_tags, num_tags] tensor.</p>

<p>Does anyone has an example how to use CRF in tensorflow? Thank you!</p>