Use log probs for paraformer (#120)

* Use log probs for paraformer

* Fix
This commit is contained in:
彭震东
2023-04-09 23:28:10 +08:00
committed by GitHub
parent 80060c276d
commit d781fcdeef
3 changed files with 15 additions and 11 deletions

View File

@@ -23,8 +23,7 @@ class OfflineParaformerDecoder {
/** Run beam search given the output from the paraformer model.
*
* @param log_probs A 3-D tensor of shape (N, T, vocab_size)
* @param token_num A 2-D tensor of shape (N, T). Its dtype is int64_t.
* log_probs[i].argmax(axis=-1) equals to token_num[i]
* @param token_num A 1-D tensor of shape (N). token_num equals to T.
*
* @return Return a vector of size `N` containing the decoded results.
*/