Skip to content

Commit b2464e3

Browse files
committed
Merge pull request opencv#17270 from l-bat:ngraph_missed_data
2 parents 6856cc7 + b27ae9c commit b2464e3

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

modules/dnn/src/layers/batch_norm_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class BatchNormLayerImpl CV_FINAL : public BatchNormLayer
373373
shape[1] = weights_.total();
374374
auto weight = std::make_shared<ngraph::op::Constant>(ngraph::element::f32, ngraph::Shape(shape), weights_.data);
375375
auto bias = std::make_shared<ngraph::op::Constant>(ngraph::element::f32, ngraph::Shape(shape), bias_.data);
376-
auto scale_node = std::make_shared<ngraph::op::v1::Multiply>(ieInpNode, weight, ngraph::op::AutoBroadcastType::NUMPY);
376+
auto scale_node = std::make_shared<ngraph::op::v0::Multiply>(ieInpNode, weight, ngraph::op::AutoBroadcastType::NUMPY);
377377
auto scale_shift = std::make_shared<ngraph::op::v1::Add>(scale_node, bias, ngraph::op::AutoBroadcastType::NUMPY);
378378
return Ptr<BackendNode>(new InfEngineNgraphNode(scale_shift));
379379
}

modules/dnn/src/layers/scale_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class ScaleLayerImpl CV_FINAL : public ScaleLayer
248248
auto weight = blobs.empty() ? ieInpNode1 :
249249
std::make_shared<ngraph::op::Constant>(ngraph::element::f32, ngraph::Shape(shape), blobs[0].data);
250250

251-
node = std::make_shared<ngraph::op::v1::Multiply>(node, weight, ngraph::op::AutoBroadcastType::NUMPY);
251+
node = std::make_shared<ngraph::op::v0::Multiply>(node, weight, ngraph::op::AutoBroadcastType::NUMPY);
252252
}
253253
if (hasBias || !hasWeights)
254254
{

modules/dnn/test/test_onnx_importer.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,11 @@ TEST_P(Test_ONNX_layers, BatchNormalization3D)
299299

300300
TEST_P(Test_ONNX_layers, BatchNormalizationUnfused)
301301
{
302-
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
303-
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
304-
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
305-
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
306302
testONNXModels("frozenBatchNorm2d");
307303
}
308304

309305
TEST_P(Test_ONNX_layers, BatchNormalizationSubgraph)
310306
{
311-
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
312-
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
313307
testONNXModels("batch_norm_subgraph");
314308
}
315309

@@ -351,9 +345,8 @@ TEST_P(Test_ONNX_layers, Expand)
351345

352346
TEST_P(Test_ONNX_layers, ExpandHW)
353347
{
354-
// ngraph::op::v1::Multiply bug
355-
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
356-
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
348+
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
349+
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
357350
testONNXModels("expand_hw");
358351
}
359352

0 commit comments

Comments
 (0)