View source on GitHub |
Decode the highest scoring sequence of tags under constraints.
tfa.text.crf_constrained_decode(
potentials: tfa.types.TensorLike
,
tag_bitmap: tfa.types.TensorLike
,
transition_params: tfa.types.TensorLike
,
sequence_length: tfa.types.TensorLike
) -> tf.Tensor
This is a function for tensor.
Returns | |
---|---|
decode_tags
|
A [batch_size, max_seq_len] matrix, with dtype tf.int32 .
Contains the highest scoring tag indices.
|
best_score
|
A [batch_size] vector, containing the score of decode_tags .
|