Versioned name: CTCGreedyDecoderSeqLen-6
Category: Sequence processing
Short description: CTCGreedyDecoderSeqLen performs greedy decoding of the logits provided as the first input. The sequence lengths are provided as the second input.
Detailed description:
This operation is similar to the TensorFlow CTCGreedyDecoder.
The operation CTCGreedyDecoderSeqLen implements best path decoding. Decoding is done in two steps:
Sequences in the batch can have different length. The lengths of sequences are coded in the second input integer tensor sequence_length
.
The main difference between CTCGreedyDecoder and CTCGreedyDecoderSeqLen is in the second input. CTCGreedyDecoder uses 2D input floating point tensor with sequence masks for each sequence in the batch while CTCGreedyDecoderSeqLen uses 1D integer tensor with sequence lengths.
Attributes
ABB*B*B
(where '*' is the blank class) will look like ABBBB
. But if the value is true, the sequence will be ABBB
.boolean
Inputs
data
- input tensor of type T_F of shape [N, T, C]
with a batch of sequences. Where T
is the maximum sequence length, N
is the batch size and C
is the number of classes. Required.sequence_length
- input tensor of type T_I of shape [N]
with sequence lengths. The values of sequence length must be less or equal to T
. Required.blank_index
- scalar or 1D tensor with 1 element of type T_I. Specifies the class index to use for the blank class. Regardless of the value of merge_repeated
attribute, if the output index for a given batch and time step corresponds to the blank_index
, no new element is emitted. Default value is C-1
. Optional.Output
[N, T]
and containing the decoded classes. All elements that do not code sequence classes are filled with -1.[N]
and containing length of decoded class sequence for each batch.Types
int32
or int64
.int32
or int64
and depends on classes_index_type
attribute.int32
or int64
and depends on sequence_length_type
attribute.Example