nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.simd.hpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,342 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_FAST_CONVOLUTION_SIMD_HPP
+#define OPENCV_FAST_CONVOLUTION_SIMD_HPP
+
+#include "opencv2/core/hal/intrin.hpp"
+#include <opencv2/core/utils/logger.hpp>
```

Review comment:
I think, it should be compile-time error in this case. ``` #error "unsupported FAST_CONV_MR and/or FAST_CONV_NR" ```
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.simd.hpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,342 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_FAST_CONVOLUTION_SIMD_HPP
+#define OPENCV_FAST_CONVOLUTION_SIMD_HPP
+
+#include "opencv2/core/hal/intrin.hpp"
+#include <opencv2/core/utils/logger.hpp>
```

Review comment:
please, remove "return" from the previous section and put `#else #error "..." #endif`, otherwise it looks weird
**File:** modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution
**Review Line:** 13

**Code Changes:**
```diff
+and adapted for OpenCV by Zihao Mu.
+
+Below is the original copyright
+*/
+
+// Tencent is pleased to support the open source community by making ncnn available.
+//
+// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
+//
+// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
```

Review comment:
You did some adaptation. Therefore, it makes sense to put a dedicated comment in the beginning: ``` // This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. /* Winograd-based convolution F(6x6, 3x3). The code has been borrowed from ncnn inference engine (https://github.com/Tencent/ncnn) and adapted for OpenCV by Zihao Mu. Please, see the original copyright below */
**File:** modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,1351 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+/*
+Winograd-based convolution F(6x6, 3x3).
+The code has been borrowed from ncnn inference engine (https://github.com/Tencent/ncnn)
+and adapted for OpenCV by Zihao Mu.
+
```

Review comment:
please, move this enumeration inside cv::dnn namespace
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution
**Review Line:** 409

**Code Changes:**
```diff
+                       (yx1 - yx0) * sizeof(cbuf[0]));
+        }
+    }
+}
+
+void runFastConv2d(InputArray _input, OutputArray _output,
+                   const Ptr<FastConv2d>& conv, int ntasks, const Ptr<ActivationLayer>& actLayer)
+{
+    Mat input = _input.getMat();
+    Mat output = _output.getMat();
+    MatShape inputShape = shape(input);
```

Review comment:
you have 2 functions with very similar names: doConvolution and runFastConv2d. What's the difference between 'do' and 'run'? Can you modify the name of one of the functions to make it more clear?
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,694 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+// This file is modified from the ficus (https://github.com/vpisarev/ficus/blob/master/lib/NN/OpConv.fx).
+// Here is the original license:
+/*
+    This file is a part of ficus language project.
+    See ficus/LICENSE for the licensing terms
```

Review comment:
In Ficus engine I had to use C, because this is the native output language for Ficus compiler. In C++ code, please, **never** use plain "malloc" or its alternatives. Use `std::vector<>` instead.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -71,6 +71,8 @@ using namespace cv::dnn::ocl4dnn;
 using namespace cv::dnn::cuda4dnn;
 #endif
 
+#include "fast_convolution/fast_convolution.hpp"
+
 namespace cv
 {
 namespace dnn
@@ -253,11 +255,14 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
```

Review comment:
I am concerned that the weights are initialized in the `forward` every time when the variable is entered, which will make the model run slower, especially for winograd.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution
**Review Line:** 2120

**Code Changes:**
```diff
+                runFastConv2d(inputs[0], outputs[0], fastConv2dImpl, nstripes, activ);
+                return;
+            }
+
+            // Use only for Conv1D and Conv3D.
             ParallelConv::run(inputs[0], outputs[0], weightsMat, biasvec, reluslope,
                             kernel_size, strides, pads_begin, pads_end, dilations, activ.get(), ngroups, nstripes);
+
         }
     }
 
```

Review comment:
For now, the `FastConv2d` is only used for Convolution 2D, and the original `ParallelConv` is still used for Convolution 1D and 3D.
**File:** modules/dnn/src/layers/fast_convolution/depthwise_convolution.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution
**Review Line:** 380

**Code Changes:**
```diff
+            depthWiseBlock(inptr, outptr0, weights, biasval, ofstab, yxtab, minval, maxval, Hi, Wi, H0, W0, ksize,
+                           pad_top, pad_left, dilation_y, stride_x, stride_y, inner_xleft, inner_xright, inner_ytop,
+                           inner_ybottom, ifMinMaxAct, useSIMD, is3x3);
+
+            if (activ)
+                activ->forwardSlice(outptr0, outptr0, (int) out_planesize, out_planesize, c, c+1);
+        }
+    });
+}
+
+}} // namespace cv::dnn
```

Review comment:
I'm sure it can handle ReLU/ReLU6(Clip) correctly. The parsing process of activation is at the beginning of `fastConv2d()`.
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.simd.hpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,342 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_FAST_CONVOLUTION_SIMD_HPP
+#define OPENCV_FAST_CONVOLUTION_SIMD_HPP
+
+#include "opencv2/core/hal/intrin.hpp"
+#include <opencv2/core/utils/logger.hpp>
```

Review comment:
For now, the output_buf(cbuf) was allocated at (`fast_convolution.cpp` LINE#542), and my idea is to allocate the output memory needed by all threads at once. Which one do you prefer?
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -71,6 +71,8 @@ using namespace cv::dnn::ocl4dnn;
 using namespace cv::dnn::cuda4dnn;
 #endif
 
+#include "fast_convolution/fast_convolution.hpp"
+
 namespace cv
 {
 namespace dnn
@@ -253,11 +255,14 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
```

Review comment:
In the latest code, I still reserve the `variableWeight ` check, because we need to initialize each time when the weight is variable.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -71,6 +71,8 @@ using namespace cv::dnn::ocl4dnn;
 using namespace cv::dnn::cuda4dnn;
 #endif
 
+#include "fast_convolution/fast_convolution.hpp"
+
 namespace cv
 {
 namespace dnn
@@ -253,11 +255,14 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
```

Review comment:
It is better to put this near `fastConv2dImpl` Also it makes sense to add documetation/information about its layout and the difference from `weighstMat`.
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.simd.hpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,342 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_FAST_CONVOLUTION_SIMD_HPP
+#define OPENCV_FAST_CONVOLUTION_SIMD_HPP
+
+#include "opencv2/core/hal/intrin.hpp"
+#include <opencv2/core/utils/logger.hpp>
```

Review comment:
ISA-targeted/SIMD code should not emit warnings (or in general call any other non-optimized functions).
**File:** modules/dnn/src/layers/fast_convolution/fast_convolution.simd.hpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,342 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_FAST_CONVOLUTION_SIMD_HPP
+#define OPENCV_FAST_CONVOLUTION_SIMD_HPP
+
+#include "opencv2/core/hal/intrin.hpp"
+#include <opencv2/core/utils/logger.hpp>
```

Review comment:
Ok, I will update it later.
**File:** modules/dnn/src/layers/fast_convolution/depthwise_convolution.cpp
**Change Type:** added
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -0,0 +1,385 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+// This file is modified from the ficus (https://github.com/vpisarev/ficus/blob/master/lib/NN/OpConv.fx).
+// Here is the original license:
+/*
+    This file is a part of ficus language project.
+    See ficus/LICENSE for the licensing terms
```

Review comment:
I expect header similar to modules/dnn/src/layers/fast_convolution/winograd_3x3s1_f63.cpp where we have OpenCV header on top and then the original license header of the adapted code.
**File:** modules/dnn/test/test_backends.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution

**Code Changes:**
```diff
@@ -545,7 +545,7 @@ TEST_P(DNNTestNetwork, FastNeuralStyle_eccv16)
     Mat img = imread(findDataFile("dnn/googlenet_1.png"));
     Mat inp = blobFromImage(img, 1.0, Size(320, 240), Scalar(103.939, 116.779, 123.68), false, false);
     // Output image has values in range [-143.526, 148.539].
-    float l1 = 4e-5, lInf = 2e-3;
+    float l1 = 1e-4, lInf = 2e-3;
     if (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD)
     {
         l1 = 0.4;
```

Review comment:
Please use x2-x5 values for test tolerance checks. 4e-5 => 1e-4 instead of 5e-5 --- Below: 1e-5 => 1e-4 instead of 1.01e-5
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #21910: DNN: Accelerating convolution
**Review Line:** 74

**Code Changes:**
```diff
@@ -71,6 +71,8 @@ using namespace cv::dnn::ocl4dnn;
 using namespace cv::dnn::cuda4dnn;
 #endif
 
+#include "fast_convolution/fast_convolution.hpp"
+
 namespace cv
 {
 namespace dnn
@@ -253,11 +255,14 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
```

Review comment:
For Win32, I have changed the memory limitation of `FasterRCNN_vgg16` from 1GB to 2GB. `FasterRCNN_vgg16` has a large memory requirement(412 MB needed on one FC layer). The new patch needs to pack the `weightMats` in advance in the initialization phase. So for Conv, we need twice as much memory to store the weights.
**File:** doc/tutorials/calib3d/interactive_calibration/interactive_calibration.markdown
**Change Type:** modified
**Context:** PR #22298: Add new parameters to interactive calibration tool tutorial

**Code Changes:**
```diff
@@ -40,6 +40,7 @@ Supported patterns:
 -   Asymmetrical circle pattern
 -   Dual asymmetrical circle pattern
 -   chAruco (chessboard with Aruco markers)
+-   Symmetrical circle pattern
 
 Description of parameters
 ------
@@ -55,16 +56,19 @@ All of this parameters are passed to application through a command line.
 -  -v=[filename]: get video from filename, default input -- camera with id=0
```

Review comment:
Zoom factor is applied for preview only, not for calibration. It's important.
**File:** doc/tutorials/calib3d/interactive_calibration/interactive_calibration.markdown
**Change Type:** modified
**Context:** PR #22298: Add new parameters to interactive calibration tool tutorial

**Code Changes:**
```diff
@@ -40,6 +40,7 @@ Supported patterns:
 -   Asymmetrical circle pattern
 -   Dual asymmetrical circle pattern
 -   chAruco (chessboard with Aruco markers)
+-   Symmetrical circle pattern
 
 Description of parameters
 ------
@@ -55,16 +56,19 @@ All of this parameters are passed to application through a command line.
 -  -v=[filename]: get video from filename, default input -- camera with id=0
```

Review comment:
PoE is about power. It's better to say "ip cameras".
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool

**Code Changes:**
```diff
@@ -6,6 +6,7 @@
 
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 #include <stdexcept>
 
@@ -30,37 +31,61 @@ CalibPipeline::CalibPipeline(captureParameters params) :
 
```

Review comment:
Some console logging/messages would be useful for OpenCV users. It makes sense to mention parameter hint too.
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool
**Review Line:** 73

**Code Changes:**
```diff
     cv::Mat frame, processedFrame, resizedFrame;
-    while(mCapture.grab()) {
+    while (true) {
+        if (!mCapture.grab())
+        {
+            if (!mCaptureParams.forceReopen)
+            {
+                CV_LOG_ERROR(NULL, "VideoCapture error: could not grab the frame.");
+                break;
+            }
+
```

Review comment:
`mCapture.isOpened()` check?
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool

**Code Changes:**
```diff
@@ -6,6 +6,7 @@
 
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 #include <stdexcept>
 
@@ -30,37 +31,61 @@ CalibPipeline::CalibPipeline(captureParameters params) :
 
```

Review comment:
It makes sense to grab "first" frame here to ensure that it is recovered (try count parameter?).
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool

**Code Changes:**
```diff
@@ -6,6 +6,7 @@
 
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 #include <stdexcept>
 
@@ -30,37 +31,61 @@ CalibPipeline::CalibPipeline(captureParameters params) :
 
```

Review comment:
I don't want to duplicate the code: it would have to be a while loop, or did you have something else in mind?
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool
**Review Line:** 83

**Code Changes:**
```diff
+
+            CV_LOG_INFO(NULL, "VideoCapture error: trying to reopen...");
+            do
+            {
+                open_camera();
+            } while (!mCapture.isOpened() || !mCapture.grab());
+
+            CV_LOG_INFO(NULL, "VideoCapture error: reopened successfully.");
+            auto newSize = cv::Size((int)mCapture.get(cv::CAP_PROP_FRAME_WIDTH), (int)mCapture.get(cv::CAP_PROP_FRAME_HEIGHT));
+            CV_CheckEQ(mImageSize, newSize, "Camera image size changed after reopening.");
+        }
```

Review comment:
Instead of blank screen for infinite period of time I prefer to see messages like these: - "Reopening camera (try #N) ..."
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool

**Code Changes:**
```diff
@@ -6,6 +6,7 @@
 
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 #include <stdexcept>
 
@@ -30,37 +31,61 @@ CalibPipeline::CalibPipeline(captureParameters params) :
 
```

Review comment:
`CV_CheckEQ(...)`
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool
**Review Line:** 83

**Code Changes:**
```diff
+
+            CV_LOG_INFO(NULL, "VideoCapture error: trying to reopen...");
+            do
+            {
+                open_camera();
+            } while (!mCapture.isOpened() || !mCapture.grab());
+
+            CV_LOG_INFO(NULL, "VideoCapture error: reopened successfully.");
+            auto newSize = cv::Size((int)mCapture.get(cv::CAP_PROP_FRAME_WIDTH), (int)mCapture.get(cv::CAP_PROP_FRAME_HEIGHT));
+            CV_CheckEQ(mImageSize, newSize, "Camera image size changed after reopening.");
+        }
```

Review comment:
Why is not informative? It indicates that process hang or not. To avoid thousands of messages/sec delay could be used, e.g. `cv::waitKey()` (also it reduce unnecessary CPU load)
**File:** apps/interactive-calibration/calibPipeline.cpp
**Change Type:** modified
**Context:** PR #22135: Add option to force reopen camera in interactive calibration tool
**Review Line:** 83

**Code Changes:**
```diff
+
+            CV_LOG_INFO(NULL, "VideoCapture error: trying to reopen...");
+            do
+            {
+                open_camera();
+            } while (!mCapture.isOpened() || !mCapture.grab());
+
+            CV_LOG_INFO(NULL, "VideoCapture error: reopened successfully.");
+            auto newSize = cv::Size((int)mCapture.get(cv::CAP_PROP_FRAME_WIDTH), (int)mCapture.get(cv::CAP_PROP_FRAME_HEIGHT));
+            CV_CheckEQ(mImageSize, newSize, "Camera image size changed after reopening.");
+        }
```

Review comment:
Because there are no functions that can hang, I think.(correct me if I'm wrong). CPU load is not an issue because this application already uses all resources it can find. Artificial delay would only slow us down if errors are common enough, but pass quickly. But if the delay is too short - we'll get a lot of messages if the errors are rare, but last longer. How many ms do you have in mind for delay?
**File:** modules/core/src/system.cpp
**Change Type:** modified
**Context:** PR #22217: Use `std::chrono::steady_clock` in `getTickCount`

**Code Changes:**
```diff
@@ -301,6 +301,9 @@ DECLARE_CV_CPUID_X86
   #endif
 #endif
 
+#if defined CV_CXX11
+  #include <chrono>
+#endif
 
 namespace cv
 {
```

Review comment:
Use `CV_CXX11`: https://github.com/opencv/opencv/blob/3.4.18/modules/core/include/opencv2/core/cvdef.h#L637
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #22153: Fix some overflows in drawing.
**Review Line:** 1162

**Code Changes:**
```diff
@@ -1159,7 +1159,7 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
     edge[0].x = edge[1].x = -XY_ONE;
     edge[0].dx = edge[1].dx = 0;
 
-    ptr += img.step*y;
+    ptr += (int64_t)img.step*y;
 
     do
     {
@@ -1188,7 +1188,7 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
                             }
```

Review comment:
`int64_t` is C++11 stuff and it is not available on 3.4 branch. 3.4 branch must use `cv::int64` instead.
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #22249: Changing data_layout for pack in tf_importer
**Review Line:** 2544

**Code Changes:**
```diff
@@ -2541,6 +2541,8 @@ void TFImporter::parsePack(tensorflow::GraphDef& net, const tensorflow::NodeDef&
     if (dim != 0)
         CV_Error(Error::StsNotImplemented, "Unsupported mode of pack operation.");
 
+    data_layouts[name] = DATA_LAYOUT_UNKNOWN;
+
     CV_Assert(hasLayerAttr(layer, "N"));
     int num = (int)getLayerAttr(layer, "N").i();
     CV_CheckEQ(num_inputs, num, "");
```

Review comment:
In `tf_importer`, some layers are sensitive to the input's data layout (like `Transpose`). And these layers may error if they are after the `Pack` layer. Maybe we can judge the output data layout by the input data layout. For example, the input is 4 dim and NHWC data layout, which means the output should be the 5 dims. But I'm not sure if this is the right way to do it.
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #22249: Changing data_layout for pack in tf_importer
**Review Line:** 2544

**Code Changes:**
```diff
@@ -2541,6 +2541,8 @@ void TFImporter::parsePack(tensorflow::GraphDef& net, const tensorflow::NodeDef&
     if (dim != 0)
         CV_Error(Error::StsNotImplemented, "Unsupported mode of pack operation.");
 
+    data_layouts[name] = DATA_LAYOUT_UNKNOWN;
+
     CV_Assert(hasLayerAttr(layer, "N"));
     int num = (int)getLayerAttr(layer, "N").i();
     CV_CheckEQ(num_inputs, num, "");
```

Review comment:
We can consider cases that have defined data layout in `tf_importer`, for example stacking hwc can have nhwc data layout output. The problem is we cannot take every single data layout into account since theoratically there is countless. I wonder in which case pack is followed by transpose though.
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #22249: Changing data_layout for pack in tf_importer
**Review Line:** 2544

**Code Changes:**
```diff
@@ -2541,6 +2541,8 @@ void TFImporter::parsePack(tensorflow::GraphDef& net, const tensorflow::NodeDef&
     if (dim != 0)
         CV_Error(Error::StsNotImplemented, "Unsupported mode of pack operation.");
 
+    data_layouts[name] = DATA_LAYOUT_UNKNOWN;
+
     CV_Assert(hasLayerAttr(layer, "N"));
     int num = (int)getLayerAttr(layer, "N").i();
     CV_CheckEQ(num_inputs, num, "");
```

Review comment:
I think we keep it unknown for the output data layout of pack since there are only 4 data layouts defined: ```cpp enum DataLayout { DATA_LAYOUT_NHWC, DATA_LAYOUT_NCHW, DATA_LAYOUT_NDHWC, DATA_LAYOUT_UNKNOWN, DATA_LAYOUT_PLANAR // 2-dimensional outputs (matmul, flatten, reshape to 2d) }; ``` These data layouts do not satisfy our need if we want to describe the output data layout of pack unless more are added.