From 0535db1c65180cfb4da046c5d865c764e6445746 Mon Sep 17 00:00:00 2001
From: lyblsgo <lyblsgo@163.com>
Date: 星期一, 24 四月 2023 10:57:53 +0800
Subject: [PATCH] rename CT-transformer
---
funasr/runtime/onnxruntime/src/CT-transformer.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/punc_infer.cpp b/funasr/runtime/onnxruntime/src/CT-transformer.cpp
similarity index 98%
rename from funasr/runtime/onnxruntime/src/punc_infer.cpp
rename to funasr/runtime/onnxruntime/src/CT-transformer.cpp
index 8dbb49d..5698703 100644
--- a/funasr/runtime/onnxruntime/src/punc_infer.cpp
+++ b/funasr/runtime/onnxruntime/src/CT-transformer.cpp
@@ -10,14 +10,19 @@
string strModelPath = pathAppend(sz_model_dir, PUNC_MODEL_FILE);
string strYamlPath = pathAppend(sz_model_dir, PUNC_YAML_FILE);
+ try{
#ifdef _WIN32
std::wstring detPath = strToWstr(strModelPath);
m_session = std::make_unique<Ort::Session>(env_, detPath.c_str(), session_options);
#else
m_session = std::make_unique<Ort::Session>(env_, strModelPath.c_str(), session_options);
#endif
- // read inputnames outputnames
- vector<string> m_strInputNames, m_strOutputNames;
+ }
+ catch(exception e)
+ {
+ printf(e.what());
+ }
+ // read inputnames outputnamess
string strName;
getInputName(m_session.get(), strName);
m_strInputNames.push_back(strName.c_str());
--
Gitblit v1.9.1