| | |
| | | using namespace std; |
| | | using namespace paraformer; |
| | | |
| | | ModelImp::ModelImp(const char* path,int nNumThread) |
| | | ModelImp::ModelImp(const char* path,int nNumThread, bool quantize) |
| | | { |
| | | string model_path = pathAppend(path, "model.onnx"); |
| | | string vocab_path = pathAppend(path, "vocab.txt"); |
| | | string model_path; |
| | | string vocab_path; |
| | | if(quantize) |
| | | { |
| | | model_path = pathAppend(path, "model_quant.onnx"); |
| | | }else{ |
| | | model_path = pathAppend(path, "model.onnx"); |
| | | } |
| | | vocab_path = pathAppend(path, "vocab.txt"); |
| | | |
| | | fe = new FeatureExtract(3); |
| | | |
| | | sessionOptions.SetInterOpNumThreads(nNumThread); |
| | | //sessionOptions.SetInterOpNumThreads(1); |
| | | sessionOptions.SetIntraOpNumThreads(nNumThread); |
| | | sessionOptions.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED); |
| | | |
| | | #ifdef _WIN32 |