fixes #17187 probably
authorShubham Singh <55784408+shubhamcodez@users.noreply.github.com>
Tue, 23 Jun 2020 09:06:32 +0000 (14:36 +0530)
committerSergey Slashchinin <sergei.slashchinin@xperience.ai>
Fri, 11 Sep 2020 15:53:42 +0000 (18:53 +0300)
Added Eltwise Layer Support

modules/dnn/src/onnx/onnx_importer.cpp

index 153d026e4bc697477c2a45905834f229f4a15777..586aa52a17bcb7cec31dc21eeb13c026cf10a580 100644 (file)
@@ -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);