Merge remote-tracking branch 'upstream/3.4' into merge-3.4
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Fri, 30 Jul 2021 14:43:17 +0000 (14:43 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Fri, 30 Jul 2021 14:50:36 +0000 (14:50 +0000)
1  2 
cmake/OpenCVDetectCUDA.cmake
modules/dnn/src/onnx/onnx_importer.cpp

Simple merge
@@@ -729,7 -561,8 +729,7 @@@ void ONNXImporter::parseAveragePool(Lay
      addLayer(layerParams, node_proto);
  }
  
- void ONNXImporter::parseReduce(LayerParams &layerParams, const opencv_onnx::NodeProto &node_proto_)
 -// "GlobalAveragePool" "GlobalMaxPool" "ReduceMean" "ReduceSum" "ReduceMax"
+ void ONNXImporter::parseReduce(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_)
  {
      opencv_onnx::NodeProto node_proto = node_proto_;
      const std::string& layer_type = node_proto.op_type();
@@@ -1949,8 -1759,8 +1949,7 @@@ void ONNXImporter::parseReshape(LayerPa
          Mat blob = getBlob(node_proto, 1);
          CV_Assert(blob.type() == CV_32SC1);
  
--        layerParams.set("dim", DictValue::arrayInt<int*>(
-                 blob.ptr<int>(), blob.total() ));
 -                    blob.ptr<int>(), blob.total() ));
++        layerParams.set("dim", DictValue::arrayInt<int*>(blob.ptr<int>(), blob.total()));
  
          if (layer_id.find(node_proto.input(0)) == layer_id.end()) {
              std::vector<Mat> inputs(1, getBlob(node_proto, 0)), outputs;