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
OpenDAS
vision
Commits
35677eca
Unverified
Commit
35677eca
authored
Sep 22, 2023
by
Thiago Crepaldi
Committed by
GitHub
Sep 22, 2023
Browse files
Update InferenceSession call to latest format (#7982)
Co-authored-by:
Philip Meier
<
github.pmeier@posteo.de
>
parent
cb512ea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
.github/workflows/tests.yml
.github/workflows/tests.yml
+1
-1
test/test_onnx.py
test/test_onnx.py
+1
-1
No files found.
.github/workflows/tests.yml
View file @
35677eca
...
...
@@ -124,7 +124,7 @@ jobs:
conda activate ci
echo '::group::Install ONNX'
pip install --progress-bar=off onnx onnxruntime
!=1.16.0
pip install --progress-bar=off onnx onnxruntime
echo '::endgroup::'
echo '::group::Install testing utilities'
...
...
test/test_onnx.py
View file @
35677eca
...
...
@@ -79,7 +79,7 @@ class TestONNXExporter:
inputs
=
list
(
map
(
to_numpy
,
inputs
))
outputs
=
list
(
map
(
to_numpy
,
outputs
))
ort_session
=
onnxruntime
.
InferenceSession
(
onnx_io
.
getvalue
())
ort_session
=
onnxruntime
.
InferenceSession
(
onnx_io
.
getvalue
()
,
providers
=
onnxruntime
.
get_available_providers
()
)
# compute onnxruntime output prediction
ort_inputs
=
{
ort_session
.
get_inputs
()[
i
].
name
:
inpt
for
i
,
inpt
in
enumerate
(
inputs
)}
ort_outs
=
ort_session
.
run
(
None
,
ort_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