ctc_beam_search_decoder treats blanks as sequence termination
ctc_greedy_decoder treats blanks as regular elements
If merge_repeated is True, merge repeated classes in the output beams.
This means that if consecutive entries in a beam are the same,
only the first of these is emitted. That is, when the sequence is
A B B * B * B (where '*' is the blank label), the return value is:
A B if merge_repeated = True.
A B B B if merge_repeated = False.
Args
inputs
3-D floatTensor, size [max_time x batch_size x num_classes].
The logits.
sequence_length
1-D int32 vector containing sequence lengths, having size
[batch_size].
beam_width
An int scalar >= 0 (beam search beam width).
top_paths
An int scalar >= 0, <= beam_width (controls output size).
merge_repeated
Boolean. Default: True.
Returns
A tuple (decoded, log_probabilities) where
decoded
A list of length top_paths, where decoded[j]
is a SparseTensor containing the decoded outputs:
decoded[j].indices: Indices matrix (total_decoded_outputs[j] x 2)
The rows store: [batch, time].
decoded[j].values: Values vector, size (total_decoded_outputs[j]).
The vector stores the decoded classes for beam j.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]