[BUG] Issue with BatchNormalization node dimensions on VGG and DUC_HDC models (opset=7)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 834
- Forks
- 109
- Avg merge
- 6h 55m
- Merged PRs (30d)
- 2
Description
When optimizing and running some VGG and ResNet DUC HDC models from ONNX Model Hub, I encountered an issue related to BatchNormalization nodes. In particular:
For VGG-16-BN, and VGG-19-BN (opset=7)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running BatchNormalization node. Name:'vgg0_batchnorm0_fwd' Status Message: Invalid input scale: NumDimensions() != 3
For ResNet101_DUC_HDC (opset=7)
2025-03-18 18:55:58.724319765 [E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running BatchNormalization node. Name:'conv1_1_3x3_s2/bn' Status Message: Invalid input scale: NumDimensions() != 3 [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running BatchNormalization node. Name:'conv1_1_3x3_s2/bn' Status Message: Invalid input scale: NumDimensions() != 3
This error was happening on all passes in the optimizer, so it is not associated to one particular pass. Also, the models work normally for greater opset (e.g., opset=12), but opset=7 is part of the official ONNX Hub and the current ONNX version is backwards compatible to it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the optimizer runs using the VGG-16-BN, VGG-19-BN, and ResNet101_DUC_HDC models at opset 7, then compare them with the same models at opset 12. Investigate the BatchNormalization dimension error across optimizer passes; done when the opset 7 models run without the reported invalid scale-dimension failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100