From 1df533c914c282f4c99d42307b9ee3b86df34caa Mon Sep 17 00:00:00 2001 From: YashasSamaga Date: Wed, 2 Sep 2020 14:25:36 +0530 Subject: [PATCH] fix typo in fusion tests --- modules/dnn/test/test_layers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp index d61f319f54..f9b0f62379 100644 --- a/modules/dnn/test/test_layers.cpp +++ b/modules/dnn/test/test_layers.cpp @@ -2343,7 +2343,7 @@ TEST_P(ConvolutionEltwiseActivationFusion, Accuracy) if (eltwiseOp != "sum" && weightedEltwise) throw SkipTestException("weighted eltwise not supported"); LayerParams eltwiseParams; - TestLayerFusion::makeDefaultTestEltwiseLayer(eltwiseParams, eltwiseOp, false); + TestLayerFusion::makeDefaultTestEltwiseLayer(eltwiseParams, eltwiseOp, weightedEltwise); std::string actType = get<3>(GetParam()); LayerParams activationParams; @@ -2353,7 +2353,7 @@ TEST_P(ConvolutionEltwiseActivationFusion, Accuracy) Target targetId = get<1>(get<4>(GetParam())); // bug: https://github.com/opencv/opencv/issues/17945 - if (eltwiseOp != "sum" && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16)) + if ((eltwiseOp != "sum" || weightedEltwise) && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16)) applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL); // bug: https://github.com/opencv/opencv/issues/17953 @@ -2440,7 +2440,7 @@ TEST_P(ConvolutionActivationEltwiseFusion, Accuracy) if (eltwiseOp != "sum" && weightedEltwise) throw SkipTestException("weighted eltwise not supported"); LayerParams eltwiseParams; - TestLayerFusion::makeDefaultTestEltwiseLayer(eltwiseParams, eltwiseOp, false); + TestLayerFusion::makeDefaultTestEltwiseLayer(eltwiseParams, eltwiseOp, weightedEltwise); Backend backendId = get<0>(get<4>(GetParam())); Target targetId = get<1>(get<4>(GetParam()));