espnet2.legacy.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior
Less than 1 minute
espnet2.legacy.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior
espnet2.legacy.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior(h: Tensor, ctc_probs: Tensor, masks: Tensor, pos_emb: Tensor = None)
Trim the encoder hidden output using CTC posterior.
The continuous frames in the tail that confidently represent blank symbols are trimmed.
