From 728923379680936d45cb0caa2be1fd52051a0bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xingchen=20Song=28=E5=AE=8B=E6=98=9F=E8=BE=B0=29?= Date: Tue, 12 Mar 2024 10:57:12 +0800 Subject: [PATCH] [search] Update search.py after line441, `score` has become a tensor instead of a scalar. --- wenet/transformer/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wenet/transformer/search.py b/wenet/transformer/search.py index 6f77e728d..862edb863 100644 --- a/wenet/transformer/search.py +++ b/wenet/transformer/search.py @@ -440,7 +440,7 @@ def attention_rescoring( # add ctc score score += ctc_scores[i] * ctc_weight if score > best_score: - best_score = score + best_score = score.item() best_index = i tokens_confidences.append(tc) results.append(