1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge pull request #25492 from alexlyulkov:al/range-fixed-5.x

Fixed ONNX Range layer to support any input type #25492

Fixed ONNX Range layer to support any input type

Extra PR: https://github.com/opencv/opencv_extra/pull/1173
Fixes #25363

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
alexlyulkov
2024-04-26 18:59:43 +03:00
committed by GitHub
parent bbe86e6dea
commit 72ad06bcf3
2 changed files with 62 additions and 20 deletions
+15 -3
View File
@@ -807,14 +807,26 @@ TEST_P(Test_ONNX_layers, CumSumExclusiveInplace)
testONNXModels("cumsum_exclusive_inplace");
}
// Issue: https://github.com/opencv/opencv/issues/25363
// The issue was addressed in 4.x, but the solution does not fit 5.x design
TEST_P(Test_ONNX_layers, DISABLED_Range)
TEST_P(Test_ONNX_layers, RangeFloat)
{
testONNXModels("range_float");
testONNXModels("range_float_negative");
}
TEST_P(Test_ONNX_layers, RangeInt32)
{
testONNXModels("range_int32");
testONNXModels("range_int32_negative");
}
TEST_P(Test_ONNX_layers, RangeInt64)
{
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); // OpenVINO uses int32 precision for int64 operations
testONNXModels("range_int64");
testONNXModels("range_int64_negative");
}
TEST_P(Test_ONNX_layers, Eltwise3D)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)