mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
fix: funasr_onnx pass run_options to ort (#2632)
This commit is contained in:
parent
68dcef510a
commit
82a07e2f6e
@ -221,10 +221,10 @@ class OrtInferSession:
|
||||
RuntimeWarning,
|
||||
)
|
||||
|
||||
def __call__(self, input_content: List[Union[np.ndarray, np.ndarray]]) -> np.ndarray:
|
||||
def __call__(self, input_content: List[Union[np.ndarray, np.ndarray]], run_options = None) -> np.ndarray:
|
||||
input_dict = dict(zip(self.get_input_names(), input_content))
|
||||
try:
|
||||
return self.session.run(self.get_output_names(), input_dict)
|
||||
return self.session.run(self.get_output_names(), input_dict, run_options)
|
||||
except Exception as e:
|
||||
raise ONNXRuntimeError("ONNXRuntime inferece failed.") from e
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user