|TensorFlow 1 version||View source on GitHub|
Decodes the output of a softmax.
tf.keras.backend.ctc_decode( y_pred, input_length, greedy=True, beam_width=100, top_paths=1 )
Can use either greedy search (also known as best path) or a constrained dictionary search.
(samples, time_steps, num_categories)containing the prediction, or output of the softmax.
(samples, )containing the sequence length for each batch item in
greedy: perform much faster best-path search if
true. This does not use a dictionary.
false: a beam search decoder will be used with a beam of this width.
false, how many of the most probable paths will be returned.
Tuple: List: if
true, returns a list of one element that contains the decoded sequence. If
false, returns the
top_pathsmost probable decoded sequences. Important: blank labels are returned as
(top_paths, )that contains the log probability of each decoded sequence.