We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8380781 + 23e71d1 commit 4b24dddCopy full SHA for 4b24ddd
modules/dnn/src/onnx/onnx_importer.cpp
@@ -680,7 +680,7 @@ void ONNXImporter::populateNet(Net dstNet)
680
LayerParams constParams;
681
constParams.name = layerParams.name + "/const";
682
constParams.type = "Const";
683
- constParams.blobs.push_back(blob);
+ constParams.blobs.push_back((isSub ? -1 : 1) * blob);
684
int id = dstNet.addLayer(constParams.name, constParams.type, constParams);
685
layer_id.insert(std::make_pair(constParams.name, LayerInfo(id, 0)));
686
outShapes[constParams.name] = shape(blob);
0 commit comments