nareshmlx/opencv-pr huggingface dataset:
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
I post it into a gist, see https://gist.github.com/Yikun/6bcb6080a0d8f542923ed637c7bbfb18 , or you could just see it in my local repo: https://github.com/Yikun/opencv/pull/2
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
> python-numpy > python3-numpy Python binding is not enabled in cross-compile build (special arm64 variants should be used or extra CMake options should be added).
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
> Unavailable: python2 python3 Python bindings are disabled
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
I try to install `libpython-dev:arm64 libpython3-dev:arm64 python-numpy:arm64 python3-numpy:arm64` first, ``` -DENABLE_PYTHON=ON \ -DPYTHON_EXECUTABLE=/usr/bin/python3.6 \ -DPYTHON_INCLUDE_DIR=/usr/include/python3.6 \ -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so ``` And I try to build with above extra options, but looks like the python2/3 binding is still unavailable, did I miss something?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
These are not OpenCV's flags. Use ``` -DPYTHON3_INCLUDE_PATH="/usr/include/python3.6" \ -DPYTHON3_NUMPY_INCLUDE_DIRS="/usr/local/lib/python3.6/dist-packages/numpy/core/include" \ -DPYTHON3_CVPY_SUFFIX=".cpython-36m-aarch64-linux-gnu.so" \ ``` (make sure you have installed `libpython3-dev:armhf` and `python3-numpy`)
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Cannot say exactly. Can you try to build and check? Which modules are in "to be built"?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
``` -- To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python2 python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto -- Disabled: world -- Disabled by dependency: - -- Unavailable: alphamat cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java js julia matlab ovis sfm viz ``` the "to be built" info are same as above(with lib flag or without lib flag), and py2 and py3 is included.
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Why `ca-certificates` is needed?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Do we really need to specify the branch? It will be more flexible to have just ``` on: [push, pull_request] ```
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
![image](https://user-images.githubusercontent.com/1736354/89884499-396e6880-dbfc-11ea-8f19-0afddf1ec85f.png) If we enable the `push` and `pull_request` labels, will triger two same tests on every PRs like above. So, maybe we could only change it to `on: [pull_request]` to enable build check on every PR in all branches.
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action
**Review Line:** 42

**Code Changes:**
```diff
+              -DPYTHON3_INCLUDE_PATH=/usr/include/python3.6m/ \
+              -DPYTHON3_LIBRARIES=/usr/lib/aarch64-linux-gnu/libpython3.6m.so \
+              -DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \
+              -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake \
+              -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
+              ../
+
+    - name: Build
+      run: |
+        cd build
+        make -j$(nproc --all)
```

Review comment:
Any more idea on it?
**File:** modules/cudaarithm/test/test_gpumat.cpp
**Change Type:** modified
**Context:** PR #17982: cuda::GpuMat::convertTo - fix for in-place arguments
**Review Line:** 378

**Code Changes:**
```diff
+        d_srcDst.convertTo(d_srcDst, depth2, a, b);
+
+        cv::Mat dst_gold;
+        src.convertTo(dst_gold, depth2, a, b);
+
+        EXPECT_MAT_NEAR(dst_gold, d_srcDst, depth2 < CV_32F ? 1.0 : 1e-4);
+    }
+}
+
 INSTANTIATE_TEST_CASE_P(CUDA, GpuMat_ConvertTo, testing::Combine(
     ALL_DEVICES,
```

Review comment:
Why 1.0 for integer types? Where do you have troubles with it?
**File:** modules/cudaarithm/test/test_gpumat.cpp
**Change Type:** modified
**Context:** PR #17982: cuda::GpuMat::convertTo - fix for in-place arguments
**Review Line:** 378

**Code Changes:**
```diff
+        d_srcDst.convertTo(d_srcDst, depth2, a, b);
+
+        cv::Mat dst_gold;
+        src.convertTo(dst_gold, depth2, a, b);
+
+        EXPECT_MAT_NEAR(dst_gold, d_srcDst, depth2 < CV_32F ? 1.0 : 1e-4);
+    }
+}
+
 INSTANTIATE_TEST_CASE_P(CUDA, GpuMat_ConvertTo, testing::Combine(
     ALL_DEVICES,
```

Review comment:
The values(`1.0`, `1e-4`) are equal to existing non-in-place tests, which a large part of these in-place tests are copied from: https://github.com/opencv/opencv/blob/11ac26bfb43ad6e10c2bd50bbba0489e2bc26a79/modules/cudaarithm/test/test_gpumat.cpp#L287
**File:** modules/cudaarithm/test/test_gpumat.cpp
**Change Type:** modified
**Context:** PR #17982: cuda::GpuMat::convertTo - fix for in-place arguments
**Review Line:** 378

**Code Changes:**
```diff
+        d_srcDst.convertTo(d_srcDst, depth2, a, b);
+
+        cv::Mat dst_gold;
+        src.convertTo(dst_gold, depth2, a, b);
+
+        EXPECT_MAT_NEAR(dst_gold, d_srcDst, depth2 < CV_32F ? 1.0 : 1e-4);
+    }
+}
+
 INSTANTIATE_TEST_CASE_P(CUDA, GpuMat_ConvertTo, testing::Combine(
     ALL_DEVICES,
```

Review comment:
For these tests that do not include scaling: `CUDA_TEST_P(GpuMat_ConvertTo, WithOutScaling)` `CUDA_TEST_P(GpuMat_ConvertTo, InplaceWithOutScaling)` we can set the tolerance to `0.0`. But for tests that include scaling: `CUDA_TEST_P(GpuMat_ConvertTo, WithScaling)` `CUDA_TEST_P(GpuMat_ConvertTo, InplaceWithScaling)` some tests fail when tolerance is `0.0`, but pass for `1.0`. I think this is acceptable since scaling includes multiplication.
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #18080: improve Mat::operator=(Scalar)

**Code Changes:**
```diff
@@ -414,6 +414,29 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
         copymask(ptrs[0], 0, ptrs[2], 0, ptrs[1], 0, sz, &esz);
 }
 
+
+static bool can_apply_memset(const Mat &mat, const Scalar &s, int &fill_value)
+{
+    // check if depth is 1 byte.
+    switch (mat.depth())
+    {
```

Review comment:
```.diff -const Mat *mat, +const Mat& mat, ``` to make static analyzers happy (missing unnecessary zero pointer check)
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #18080: improve Mat::operator=(Scalar)

**Code Changes:**
```diff
@@ -414,6 +414,29 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
         copymask(ptrs[0], 0, ptrs[2], 0, ptrs[1], 0, sz, &esz);
 }
 
+
+static bool can_apply_memset(const Mat &mat, const Scalar &s, int &fill_value)
+{
+    // check if depth is 1 byte.
+    switch (mat.depth())
+    {
```

Review comment:
Remove dead code
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #18080: improve Mat::operator=(Scalar)

**Code Changes:**
```diff
@@ -414,6 +414,29 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
         copymask(ptrs[0], 0, ptrs[2], 0, ptrs[1], 0, sz, &esz);
 }
 
+
+static bool can_apply_memset(const Mat &mat, const Scalar &s, int &fill_value)
+{
+    // check if depth is 1 byte.
+    switch (mat.depth())
+    {
```

Review comment:
Avoid magic constants. - return "bool" value - add "output" parameter reference which will be filled. (keep source code and binaries clean)
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #18080: improve Mat::operator=(Scalar)

**Code Changes:**
```diff
@@ -414,6 +414,29 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
         copymask(ptrs[0], 0, ptrs[2], 0, ptrs[1], 0, sz, &esz);
 }
 
+
+static bool can_apply_memset(const Mat &mat, const Scalar &s, int &fill_value)
+{
+    // check if depth is 1 byte.
+    switch (mat.depth())
+    {
```

Review comment:
I agree. ( nice suggestion ) Your suggestion make code better clean.
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #18080: improve Mat::operator=(Scalar)

**Code Changes:**
```diff
@@ -414,6 +414,29 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
         copymask(ptrs[0], 0, ptrs[2], 0, ptrs[1], 0, sz, &esz);
 }
 
+
+static bool can_apply_memset(const Mat &mat, const Scalar &s, int &fill_value)
+{
+    // check if depth is 1 byte.
+    switch (mat.depth())
+    {
```

Review comment:
I do not agree. - for readability : code reader save time without reading unnecessary code below. - for short-circuit : remove unnecessary operation.
**File:** doc/opencv-logo.md
**Change Type:** added
**Context:** PR #18135: Added a note about OpenCV logo

**Code Changes:**
```diff
@@ -0,0 +1,9 @@
+OpenCV logo has been originally designed and contributed to OpenCV by Adi Shavit in 2006. The graphical part consists of three stylized letters O, C, V, colored in the primary R, G, B color components, used by humans and computers to perceive the world. It is shaped in a way to mimic the famous [Kanizsa's triangle](https://en.wikipedia.org/wiki/Illusory_contours) to emphasize that the prior knowledge and internal processing are at least as important as the actually acquired "raw" data.
+
+The restyled version of the logo has been designed and contributed by [xperience.ai](https://xperience.ai/) in July 2020 for the [20th anniversary](https://opencv.org/anniversary/) of OpenCV.
+
+The logo uses [Exo 2](https://fonts.google.com/specimen/Exo+2#about) font by Natanael Gama distributed under OFL license.
+
+Higher-resolution version of the logo, as well as SVG version of it, can be obtained at OpenCV [Media Kit](https://opencv.org/resources/media-kit/).
+
+![](./opencv-logo2.png)
```

Review comment:
Would you like to provide a valid link?
**File:** doc/opencv-logo.md
**Change Type:** added
**Context:** PR #18135: Added a note about OpenCV logo
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,9 @@
+OpenCV logo has been originally designed and contributed to OpenCV by Adi Shavit in 2006. The graphical part consists of three stylized letters O, C, V, colored in the primary R, G, B color components, used by humans and computers to perceive the world. It is shaped in a way to mimic the famous [Kanizsa's triangle](https://en.wikipedia.org/wiki/Illusory_contours) to emphasize that the prior knowledge and internal processing are at least as important as the actually acquired "raw" data.
+
+The restyled version of the logo has been designed and contributed by [xperience.ai](https://xperience.ai/) in July 2020 for the [20th anniversary](https://opencv.org/anniversary/) of OpenCV.
+
+The logo uses [Exo 2](https://fonts.google.com/specimen/Exo+2#about) font by Natanael Gama distributed under OFL license.
+
```

Review comment:
It seems to me it's good to embed an image of the logo in this page
**File:** doc/opencv-logo.md
**Change Type:** added
**Context:** PR #18135: Added a note about OpenCV logo

**Code Changes:**
```diff
@@ -0,0 +1,9 @@
+OpenCV logo has been originally designed and contributed to OpenCV by Adi Shavit in 2006. The graphical part consists of three stylized letters O, C, V, colored in the primary R, G, B color components, used by humans and computers to perceive the world. It is shaped in a way to mimic the famous [Kanizsa's triangle](https://en.wikipedia.org/wiki/Illusory_contours) to emphasize that the prior knowledge and internal processing are at least as important as the actually acquired "raw" data.
+
+The restyled version of the logo has been designed and contributed by [xperience.ai](https://xperience.ai/) in July 2020 for the [20th anniversary](https://opencv.org/anniversary/) of OpenCV.
+
+The logo uses [Exo 2](https://fonts.google.com/specimen/Exo+2#about) font by Natanael Gama distributed under OFL license.
+
+Higher-resolution version of the logo, as well as SVG version of it, can be obtained at OpenCV [Media Kit](https://opencv.org/resources/media-kit/).
+
+![](./opencv-logo2.png)
```

Review comment:
Yes, because if you will try to click at https://github.com/AnnaPetrovicheva/opencv/blob/logo_text/doc/opencv-logo.md - you will see "Page not found" GitHub's error
**File:** doc/opencv-logo.md
**Change Type:** added
**Context:** PR #18135: Added a note about OpenCV logo
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,9 @@
+OpenCV logo has been originally designed and contributed to OpenCV by Adi Shavit in 2006. The graphical part consists of three stylized letters O, C, V, colored in the primary R, G, B color components, used by humans and computers to perceive the world. It is shaped in a way to mimic the famous [Kanizsa's triangle](https://en.wikipedia.org/wiki/Illusory_contours) to emphasize that the prior knowledge and internal processing are at least as important as the actually acquired "raw" data.
+
+The restyled version of the logo has been designed and contributed by [xperience.ai](https://xperience.ai/) in July 2020 for the [20th anniversary](https://opencv.org/anniversary/) of OpenCV.
+
+The logo uses [Exo 2](https://fonts.google.com/specimen/Exo+2#about) font by Natanael Gama distributed under OFL license.
+
```

Review comment:
I'd like to recommend to move at the top and resize: ``` <img src="opencv-logo2.png" width="256"> ``` (or different width)
**File:** modules/features2d/include/opencv2/features2d.hpp
**Change Type:** modified
**Context:** PR #18001: 8-bit SIFT descriptors

**Code Changes:**
```diff
@@ -276,6 +276,33 @@ class CV_EXPORTS_W SIFT : public Feature2D
         double contrastThreshold = 0.04, double edgeThreshold = 10,
         double sigma = 1.6);
 
+    /** @brief Create SIFT with specified descriptorType.
+    @param nfeatures The number of best features to retain. The features are ranked by their scores
+    (measured in SIFT algorithm as the local contrast)
+
+    @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
+    number of octaves is computed automatically from the image resolution.
```

Review comment:
I suggest to change the last parameter to `int descriptorType = CV_32F`, because it's more extendible and easier to read the code: ```SIFT::create(..., CV_8U);``` is more clear than ```SIFT::create(..., true);```
**File:** modules/features2d/include/opencv2/features2d.hpp
**Change Type:** modified
**Context:** PR #18001: 8-bit SIFT descriptors

**Code Changes:**
```diff
@@ -276,6 +276,33 @@ class CV_EXPORTS_W SIFT : public Feature2D
         double contrastThreshold = 0.04, double edgeThreshold = 10,
         double sigma = 1.6);
 
+    /** @brief Create SIFT with specified descriptorType.
+    @param nfeatures The number of best features to retain. The features are ranked by their scores
+    (measured in SIFT algorithm as the local contrast)
+
+    @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
+    number of octaves is computed automatically from the image resolution.
```

Review comment:
Could you please update the parameter description as well
**File:** modules/features2d/src/sift.dispatch.cpp
**Change Type:** modified
**Context:** PR #18001: 8-bit SIFT descriptors

**Code Changes:**
```diff
@@ -88,7 +88,7 @@ class SIFT_Impl : public SIFT
 public:
     explicit SIFT_Impl( int nfeatures = 0, int nOctaveLayers = 3,
                           double contrastThreshold = 0.04, double edgeThreshold = 10,
-                          double sigma = 1.6);
+                          double sigma = 1.6, int descriptorType = CV_32F );
 
     //! returns the descriptor size in floats (128)
     int descriptorSize() const CV_OVERRIDE;
@@ -117,13 +117,25 @@ class SIFT_Impl : public SIFT
```

Review comment:
IMO it make sense to propagate the type info deeper to `SIFT_Impl` itself to simplify `descriptorType()` and allocation of `_descriptors`. I also suggest providing a comment why `_descriptorType` is restricted to 8U and 32F since it's not obvious here.
**File:** modules/features2d/include/opencv2/features2d.hpp
**Change Type:** modified
**Context:** PR #18001: 8-bit SIFT descriptors

**Code Changes:**
```diff
@@ -276,6 +276,33 @@ class CV_EXPORTS_W SIFT : public Feature2D
         double contrastThreshold = 0.04, double edgeThreshold = 10,
         double sigma = 1.6);
 
+    /** @brief Create SIFT with specified descriptorType.
+    @param nfeatures The number of best features to retain. The features are ranked by their scores
+    (measured in SIFT algorithm as the local contrast)
+
+    @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
+    number of octaves is computed automatically from the image resolution.
```

Review comment:
Could you please add one more `create` function instead. If there are two `create` functions: one with the previous set of parameters and one with extended set of parameters(without default values so all of them are mandatory) it should solve ABI compatibility check issue. By the way there is no ABI compatibility requirement on master branch, so such a change should pass CI tests there.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #17976: dnn: add exhaustive fusion tests, enable more eltwise fusions
**Review Line:** 2172

**Code Changes:**
```diff
+    }
+
+    static testing::internal::ParamGenerator<std::string> activationLayersList()
+    {
+        // TODO: automate list generation
+        return Values("ReLU", "ReLU6", "ChannelsPReLU", "TanH", "Swish", "Mish", "Sigmoid", "ELU", "AbsVal", "BNLL", "Power");
+    }
+
+    static testing::internal::ParamGenerator<tuple<Backend, Target> > dnnBackendsAndTargetsForFusionTests()
+    {
+        return dnnBackendsAndTargets(false, false, true, false); // OCV OpenCL + OCV CPU
```

Review comment:
I was wondering if it would be possible to automatically generate this list.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #17976: dnn: add exhaustive fusion tests, enable more eltwise fusions

**Code Changes:**
```diff
@@ -2046,4 +2046,436 @@ TEST_P(Layer_Test_BatchNorm, fusion)
 
 INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_BatchNorm, dnnBackendsAndTargets());
 
+class TestLayerFusion : public DNNTestLayer {
+public:
+    static void makeDefaultTestConvolutionLayer(LayerParams& convParams, int in_channels, int num_filters, bool bias_term)
+    {
+        const int kernel_h = 3, kernel_w = 3;
+        const int pad_h = kernel_h / 2, pad_w = kernel_w / 2;
```

Review comment:
The fusion tests are checked for OpenCL only in 3.4. I am not sure if these should be enabled for other backends since they don't fuse activations or eltwise. Note that this line might require special handling in 3.4 merge PR. The `withCUDA` appears before `withNgraph` on master. The tests should be turned on for CUDA.
**File:** modules/dnn/src/dnn.cpp
**Change Type:** modified
**Context:** PR #17976: dnn: add exhaustive fusion tests, enable more eltwise fusions
**Review Line:** 2461

**Code Changes:**
```diff
@@ -2458,7 +2458,7 @@ struct Net::Impl : public detail::NetImplBase
                                     if( nextData )
                                         nextActivLayer = nextData->layerInstance.dynamicCast<ActivationLayer>();
 
-                                    if( !nextActivLayer.empty() && pinsToKeep.count(lpNext) == 0 &&
+                                    if( !nextActivLayer.empty() &&
                                             (!nextData->type.compare("ReLU") ||
                                              !nextData->type.compare("ChannelsPReLU") ||
                                              !nextData->type.compare("Power")) &&
```

Review comment:
This change need not be propagated to master. The eltwise fusion logic is divergent. #17939 applies the same fix on master.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #17976: dnn: add exhaustive fusion tests, enable more eltwise fusions
**Review Line:** 2131

**Code Changes:**
```diff
+        for (int i = 0; i < refTimings.size(); i++)
+        {
+            CV_Assert(refTimings[i] != 0.0);
+        }
+
+        net.enableFusion(true);
+        net.setPreferableBackend(backendId);
+        net.setPreferableTarget(targetId);
+        net.setInput(input);
+        Mat outputTest = net.forward().clone();
+        std::vector<double> testTimings;
```

Review comment:
I this that it's more reliable to have separate Net objects for with and without fusion enabled