fix
九耳
2023-03-30 7df8452a8520cf3e4609114b47510371b2c621a2
fix
1个文件已修改
5 ■■■■■ 已修改文件
funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/runtime/python/onnxruntime/funasr_onnx/punc_bin.py
@@ -76,9 +76,8 @@
            try:
                outputs = self.infer(data['text'], data['text_lengths'])
                y = outputs[0]
                _, indices = y.view(-1, y.shape[-1]).topk(1, dim=1)
                punctuations = indices
                assert punctuations.size()[0] == len(mini_sentence)
                punctuations = np.argmax(y,axis=-1)[0]
                assert punctuations.size == len(mini_sentence)
            except ONNXRuntimeError:
                logging.warning("error")