CUCTCDecoder¶
- class torchaudio.models.decoder.CUCTCDecoder[source]¶
CUDA CTC 束搜尋解碼器。
注意
要構建解碼器,請使用工廠函式
cuda_ctc_decoder()。- 使用
CUCTCDecoder的教程
- 使用
方法¶
__call__¶
- CUCTCDecoder.__call__(log_prob: Tensor, encoder_out_lens: Tensor)[source]¶
- 引數:
log_prob (torch.FloatTensor) – 形狀為 (batch, frame, num_tokens) 的 GPU tensor,儲存標籤機率分佈序列;即 log_softmax(聲學模型輸出)。
lengths (dpython:type torch.python:int32) – 形狀為 (batch, ) 的 GPU tensor,儲存每個批次中輸出 Tensor 在時間軸上的有效長度。
- 返回:
每個批次中各音訊序列的排序最佳假設列表。
- 返回型別:
List[List[CUCTCHypothesis]]