Normalize axis parameter in DNN Concat to handle negative values.

This commit is contained in:
Alexander Smorkalov 2024-01-16 09:40:52 +03:00
parent 2791bb7062
commit 26cf82a56c
2 changed files with 2 additions and 1 deletions

View File

@ -2617,6 +2617,7 @@ void ONNXImporter::parseConcat(LayerParams& layerParams, const opencv_onnx::Node
// Concat-1 has default value for axis is 1: https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Concat-1
int axis = layerParams.get<int>("axis", 1);
axis = normalize_axis(axis, inputShape.size());
for (size_t i = 0; i < inputs.size(); ++i)
{
MatShape targetShape = inputShape;

View File

@ -41,7 +41,7 @@
"test_cast_STRING_to_FLOAT",
"test_castlike_FLOAT_to_STRING_expanded",
"test_castlike_STRING_to_FLOAT_expanded",
"test_concat_1d_axis_negative_1",
"test_concat_1d_axis_negative_1", // 1d support is required
"test_div_uint8", // output type mismatch
"test_maxpool_2d_dilations",
"test_maxpool_2d_same_lower",