From 23e71d1aa20ae2105cba9f7346d339036f45f3ce Mon Sep 17 00:00:00 2001 From: Shubham Singh <55784408+shubhamcodez@users.noreply.github.com> Date: Tue, 23 Jun 2020 14:36:32 +0530 Subject: [PATCH] fixes #17187 probably Added Eltwise Layer Support --- modules/dnn/src/onnx/onnx_importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp index 153d026e4b..586aa52a17 100644 --- a/modules/dnn/src/onnx/onnx_importer.cpp +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -653,7 +653,7 @@ void ONNXImporter::populateNet(Net dstNet) LayerParams constParams; constParams.name = layerParams.name + "/const"; constParams.type = "Const"; - constParams.blobs.push_back(blob); + constParams.blobs.push_back((isSub ? -1 : 1) * blob); int id = dstNet.addLayer(constParams.name, constParams.type, constParams); layer_id.insert(std::make_pair(constParams.name, LayerInfo(id, 0))); outShapes[constParams.name] = shape(blob);