tf.nn.ctc_greedy_decoder

View source on GitHub

Performs greedy decoding on the logits given in input (best path).

tf.nn.ctc_greedy_decoder(
    inputs, sequence_length, merge_repeated=True
)

Note: Regardless of the value of merge_repeated, if the maximum index of a given time and batch corresponds to the blank index (num_classes - 1), no new element is emitted.

If merge_repeated is True, merge repeated classes in output. This means that if consecutive logits' maximum indices are the same, only the first of these is emitted. The sequence A B B * B * B (where '*' is the blank label) becomes

Args:

Returns:

A tuple (decoded, neg_sum_logits) where