View source on GitHub |
Computes the alpha values in a linear-chain CRF.
tfa.text.crf_forward(
inputs: tfa.types.TensorLike
,
state: tfa.types.TensorLike
,
transition_params: tfa.types.TensorLike
,
sequence_lengths: tfa.types.TensorLike
) -> tf.Tensor
See http://www.cs.columbia.edu/~mcollins/fb.pdf for reference.
Returns | |
---|---|
new_alphas
|
A [batch_size, num_tags] matrix containing the new alpha values. |