blocks.utils.ctc¶
Functions¶
decode_ctc_prediction(): Decode raw CTC prediction to the actual output assuming that the last prediction bitdecode_ctc_prediction_with_eos(): Same asdecode_ctc_prediction()but cut the prediction (and indices) at <EOS> character assuming that
-
blocks.utils.ctc.decode_ctc_prediction(ctc_prediction)[source]¶ Decode raw CTC prediction to the actual output assuming that the last prediction bit is reserved for the empty character.
-
blocks.utils.ctc.decode_ctc_prediction_with_eos(ctc_prediction)[source]¶ Same as
decode_ctc_prediction()but cut the prediction (and indices) at <EOS> character assuming that <EOS> = dim-2.- Parameters
ctc_prediction – 2d array of time x probabilities
- Returns
a tuple of (decoded predictions, indices of emitted characters)