shixian.shi
2023-08-16 57875a51d9e33754149f54e14304ee4fb27e4519
quant inference
1个文件已修改
8 ■■■■ 已修改文件
funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
@@ -235,8 +235,12 @@
            except:
                raise "model_dir must be model_name in modelscope or local path downloaded from modelscope, but is {}".format(model_dir)
        
        model_bb_file = os.path.join(model_dir, 'model.onnx')
        model_eb_file = os.path.join(model_dir, 'model_eb.onnx')
        if quantize:
            model_bb_file = os.path.join(model_dir, 'model_quant.onnx')
            model_eb_file = os.path.join(model_dir, 'model_eb_quant.onnx')
        else:
            model_bb_file = os.path.join(model_dir, 'model.onnx')
            model_eb_file = os.path.join(model_dir, 'model_eb.onnx')
        token_list_file = os.path.join(model_dir, 'tokens.txt')
        self.vocab = {}