# Module: tf.contrib.crf

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/crf/__init__.py) |

Linear-chain CRF layer.

## Classes

[`class CrfDecodeBackwardRnnCell`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/CrfDecodeBackwardRnnCell): Computes backward decoding in a linear-chain CRF.

[`class CrfDecodeForwardRnnCell`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/CrfDecodeForwardRnnCell): Computes the forward decoding in a linear-chain CRF.

[`class CrfForwardRnnCell`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/CrfForwardRnnCell): Computes the alpha values in a linear-chain CRF.

## Functions

[`crf_binary_score(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_binary_score): Computes the binary scores of tag sequences.

[`crf_decode(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_decode): Decode the highest scoring sequence of tags in TensorFlow.

[`crf_log_likelihood(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_log_likelihood): Computes the log-likelihood of tag sequences in a CRF.

[`crf_log_norm(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_log_norm): Computes the normalization for a CRF.

[`crf_multitag_sequence_score(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_multitag_sequence_score): Computes the unnormalized score of all tag sequences matching tag_bitmap.

[`crf_sequence_score(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_sequence_score): Computes the unnormalized score for a tag sequence.

[`crf_unary_score(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/crf_unary_score): Computes the unary scores of tag sequences.

[`viterbi_decode(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf/viterbi_decode): Decode the highest scoring sequence of tags outside of TensorFlow.