openvinotoolkit/openvino
View on GitHub[Bug]: Dimension of data input shape along 'axis': 7 must be evenly divisible by 'num_splits' attribute value: 4
Open
#21,175 opened on Nov 20, 2023
category: ONNX FEgood first issuesupport_request
Repository metrics
- Stars
- (10,286 stars)
- PR merge metrics
- (Avg merge 14d 3h) (305 merged PRs in 30d)
Description
OpenVINO Version
openvino-nightly 2023.2.0.dev20231101
Operating System
Ubuntu 18.04 (LTS)
Device used for inference
CPU
Framework
ONNX
Model used
https://github.com/jikechao/onnx_models/blob/main/Split.onnx
Issue description
For the special case, ONNXRuntime can support it and give correct calculation results. However, the conversion from ONNX to OV IR crashed. This is caused by incorrect constraint checking, like Dimension of data input shape along 'axis': 7 must be evenly divisible by 'num_splits' attribute value: 4
Step-by-step reproduction
download the given model and convert it to OV IR.
import openvino as ov
onnx_model_path = 'Split.onnx'
ov_model = ov.convert_model(onnx_model_path)
Relevant log output
Traceback (most recent call last):
File "test.py", line 4, in <module>
ov_model = ov.convert_model(onnx_model_path)
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\convert.py", line 101, in convert_model
ov_model, _ = _convert(cli_parser, params, True)
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 524, in _convert
raise e
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 476, in _convert
ov_model = driver(argv, {"conversion_parameters": non_default_params})
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 226, in driver
ov_model = moc_emit_ir(prepare_ir(argv), argv)
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 172, in prepare_ir
ov_model = moc_pipeline(argv, moc_front_end)
File "C:\software\conda\envs\torch\lib\site-packages\openvino\tools\ovc\moc_frontend\pipeline.py", line 247, in moc_pipeline
ov_model = moc_front_end.convert(input_model)
File "C:\software\conda\envs\torch\lib\site-packages\openvino\frontend\frontend.py", line 18, in convert
converted_model = super().convert(model)
RuntimeError: Check 'error_message.empty()' failed at src\frontends\onnx\frontend\src\frontend.cpp:124:
Errors during ONNX translation:
While validating ONNX node '<Node(Split): output_1, output_2, output_3, output_4>':
Check 'dimension_at_axis % num_splits == 0' failed at src\core\shape_inference\include\split_shape_inference.hpp:62:
While validating node 'opset1::Split Split_3 (input[0]:f32[7], Constant_2[0]:i64[]) -> (dynamic[...])' with friendly_name 'Split_3':
Dimension of data input shape along 'axis': 7 must be evenly divisible by 'num_splits' attribute value: 4
Issue submission checklist
- I'm reporting an issue. It's not a question.
- I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
- There is reproducer code and related data files such as images, videos, models, etc.