-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
bugcontributions welcomemodule: checkeronnx.checkeronnx.checkermodule: version converterIssues related to ONNX version converterIssues related to ONNX version converter
Milestone
Description
Bug Report
Is the issue related to model conversion?
NoDescribe the bug
An error occurred in the version converter, convert Split from opset11 to 18 failed. The converted Split-18 has neither input 'split' nor attribute 'num_outputs', but the onnx.checker.check_model does not report an error, and the onnxruntime does not work.System information
- OS Platform and Distribution: Linux Ubuntu 20.04
- ONNX version: 1.14.0
- Python version: Python 3.9
Reproduction instructions
- Operator description:
Split-11: There is only 'axis' in the attribute, not 'split'.
Converted split-18: There is only 'axis' in the attribute, neither input 'split' nor attribute 'num_outputs'.
import onnx
import onnxruntime
model = onnx.load('model.onnx')
model = onnx.version_converter.convert_version(model, 18)
onnx.checker.check_model(model) # success
sess = onnxruntime.InferenceSession(model.SerializeToString()) # fail
Expected behavior
1.onnx.checker.check_model can check for model errors 2. the version converter can give the correct Split-18.Notes
error:
onnxruntime.capi.onnxruntime_pybind11_state.Fail:[ONNXRuntimeError]:1:FAIL:Node(Split_1)Op (Split)[ShapeInferenceError] Neither 'Split' input nor 'num_outputs' attribute has been given.
RabJon
Metadata
Metadata
Assignees
Labels
bugcontributions welcomemodule: checkeronnx.checkeronnx.checkermodule: version converterIssues related to ONNX version converterIssues related to ONNX version converter