From 6226ea00859eb49b8b83ea80db42aa6a2f58fa9a Mon Sep 17 00:00:00 2001 From: Liubov Batanina Date: Thu, 6 Aug 2020 15:47:34 +0300 Subject: [PATCH] Fix bug in ONNX Gather op --- modules/dnn/src/onnx/onnx_importer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp index 407dcdc570..f6dc285fad 100644 --- a/modules/dnn/src/onnx/onnx_importer.cpp +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -1395,6 +1395,7 @@ void ONNXImporter::populateNet(Net dstNet) inpShape.erase(inpShape.begin() + axis); layerParams.type = "Reshape"; + layerParams.set("axis", 0); layerParams.set("dim", DictValue::arrayInt(&inpShape[0], inpShape.size())); node_proto.set_input(0, sliceLp.name); }