Skip to content

Commit 4b24ddd

Browse files
committed
Merge pull request opencv#18317 from sl-sergei:restored_pr_17629
2 parents 8380781 + 23e71d1 commit 4b24ddd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/dnn/src/onnx/onnx_importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ void ONNXImporter::populateNet(Net dstNet)
680680
LayerParams constParams;
681681
constParams.name = layerParams.name + "/const";
682682
constParams.type = "Const";
683-
constParams.blobs.push_back(blob);
683+
constParams.blobs.push_back((isSub ? -1 : 1) * blob);
684684
int id = dstNet.addLayer(constParams.name, constParams.type, constParams);
685685
layer_id.insert(std::make_pair(constParams.name, LayerInfo(id, 0)));
686686
outShapes[constParams.name] = shape(blob);

0 commit comments

Comments
 (0)