Skip to content

Issue with BatchNormalization node dimensions on VGG and DUC_HDC models (opset=7) #177

@researcher-no-name

Description

@researcher-no-name

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions