Fix onnxruntime load error for newest onnxruntime
This commit is contained in:
parent
dec4c12940
commit
6abd03257a
@ -160,7 +160,9 @@ def run_export(
|
|||||||
|
|
||||||
if onnxruntime_exists:
|
if onnxruntime_exists:
|
||||||
ort_inputs = {k: to_numpy(v) for k, v in dummy_inputs.items()}
|
ort_inputs = {k: to_numpy(v) for k, v in dummy_inputs.items()}
|
||||||
ort_session = onnxruntime.InferenceSession(output)
|
# set cpu provider default
|
||||||
|
providers = ['CPUExecutionProvider']
|
||||||
|
ort_session = onnxruntime.InferenceSession(output, providers=providers)
|
||||||
_ = ort_session.run(None, ort_inputs)
|
_ = ort_session.run(None, ort_inputs)
|
||||||
print("Model has successfully been run with ONNXRuntime.")
|
print("Model has successfully been run with ONNXRuntime.")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user