Skip to content

Commit 3cabe6a

Browse files
committed
Use ort to load the model
1 parent 25dffe6 commit 3cabe6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/ir/model_zoo_test/model_zoo_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import traceback
1919

2020
import onnx
21+
import onnxruntime as ort
2122
import tqdm
2223
from onnx import hub
2324

@@ -46,6 +47,8 @@ def test_model(model_info: hub.ModelInfo) -> float:
4647
serialized, model, ignore_initializer_value_proto=True
4748
)
4849
onnx.checker.check_model(serialized)
50+
# Check the model can be loaded with onnxruntime
51+
ort.InferenceSession(serialized.SerializeToString())
4952
return end - start
5053

5154

0 commit comments

Comments
 (0)