Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
RapidASR
Commits
596386af
"vscode:/vscode.git/clone" did not exist on "39d24d9ddb60ec6f43ac9255753a9ea315bd0349"
Unverified
Commit
596386af
authored
Mar 28, 2023
by
SWHL
Committed by
GitHub
Mar 28, 2023
Browse files
Update utils.py
parent
c3c9b6b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/rapid_paraformer/utils.py
python/rapid_paraformer/utils.py
+2
-2
No files found.
python/rapid_paraformer/utils.py
View file @
596386af
...
@@ -300,12 +300,12 @@ class OrtInferSession():
...
@@ -300,12 +300,12 @@ class OrtInferSession():
RuntimeWarning
)
RuntimeWarning
)
def
__call__
(
self
,
def
__call__
(
self
,
input_content
:
List
[
Union
[
np
.
ndarray
,
np
.
ndarray
]
])
->
np
.
ndarray
:
input_content
:
List
[
np
.
ndarray
])
->
np
.
ndarray
:
input_dict
=
dict
(
zip
(
self
.
get_input_names
(),
input_content
))
input_dict
=
dict
(
zip
(
self
.
get_input_names
(),
input_content
))
try
:
try
:
return
self
.
session
.
run
(
None
,
input_dict
)
return
self
.
session
.
run
(
None
,
input_dict
)
except
Exception
as
e
:
except
Exception
as
e
:
raise
ONNXRuntimeError
(
'ONNXRuntime inferece failed.'
)
from
e
raise
ONNXRuntimeError
(
'ONNXRuntime infere
n
ce failed.'
)
from
e
def
get_input_names
(
self
,
):
def
get_input_names
(
self
,
):
return
[
v
.
name
for
v
in
self
.
session
.
get_inputs
()]
return
[
v
.
name
for
v
in
self
.
session
.
get_inputs
()]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment