mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-13 06:20:49 +08:00
Update OrtInferSession tip when meets error.
This commit is contained in:
1 parent
11c725d9b1
commit
02278c2d67
1 file changed
+3
-1
@@ -2,6 +2,7 @@
|
||||
# @Author: SWHL
|
||||
# @Contact: liekkaskono@163.com
|
||||
import argparse
|
||||
import traceback
|
||||
import warnings
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
@@ -71,7 +72,8 @@ class OrtInferSession:
|
||||
try:
|
||||
return self.session.run(self.get_output_names(), input_dict)
|
||||
except Exception as e:
|
||||
raise ONNXRuntimeError("ONNXRuntime inference failed.") from e
|
||||
error_info = traceback.format_exc()
|
||||
raise ONNXRuntimeError(error_info) from e
|
||||
|
||||
def get_input_names(
|
||||
self,
|
||||
|
||||
Reference in new issue
Block a user