From a674ae1bcee60e12dea0c973081b8b2c776f7a68 Mon Sep 17 00:00:00 2001 From: nklskyoy <31723634+nklskyoy@users.noreply.github.com> Date: Mon, 24 Mar 2025 09:06:29 +0100 Subject: [PATCH] Merge pull request #27102 from nklskyoy:test_gemm_3inputs Test gemm 3inputs #27102 Merge with test data: https://github.com/opencv/opencv_extra/pull/1245 ### 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 --- modules/dnn/test/test_onnx_importer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/dnn/test/test_onnx_importer.cpp b/modules/dnn/test/test_onnx_importer.cpp index 8ff0e17974..ec2e923fb8 100644 --- a/modules/dnn/test/test_onnx_importer.cpp +++ b/modules/dnn/test/test_onnx_importer.cpp @@ -3177,6 +3177,18 @@ TEST_P(Test_ONNX_layers, where_node) TEST_P(Test_ONNX_layers, Gemm_all_attributes) { testONNXModels("test_gemm_all_attributes", pb, 0, 0, false, true, 2); } +TEST_P(Test_ONNX_layers, Gemm_3inputs_scalar_bias) { + testONNXModels("test_gemm_3inputs_scalar_bias", pb, 0, 0, false, true, 3); +} +TEST_P(Test_ONNX_layers, Gemm_3inputs_matrix_bias) { + testONNXModels("test_gemm_3inputs_matrix_bias", pb, 0, 0, false, true, 3); +} +TEST_P(Test_ONNX_layers, Gemm_3inputs_single_elem_vector_bias) { + testONNXModels("test_gemm_3inputs_single_elem_vector_bias", pb, 0, 0, false, true, 3); +} +TEST_P(Test_ONNX_layers, Gemm_3inputs_vector_bias) { + testONNXModels("test_gemm_3inputs_vector_bias", pb, 0, 0, false, true, 3); +} TEST_P(Test_ONNX_layers, Gemm_alpha) { testONNXModels("test_gemm_alpha", pb, 0, 0, false, true, 2); }