shixian.shi
2023-07-06 5690a8bcb314ee53a5db1c704f6e3fe61460c7f6
update infer func for old contextual
1个文件已修改
2 ■■■ 已修改文件
funasr/models/e2e_asr_paraformer.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/models/e2e_asr_paraformer.py
@@ -2107,7 +2107,7 @@
        return loss_att, acc_att, cer_att, wer_att, loss_pre
    def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None):
    def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None, clas_scale=1.0):
        if hw_list is None:
            # default hotword list
            hw_list = [torch.Tensor([self.sos]).long().to(encoder_out.device)]  # empty hotword list