mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
Merge pull request #18353 from l-bat:issue_18350
* Fixed bug in ONNX Mul op * Replaced node
This commit is contained in:
parent
e668cff573
commit
ebb528976f
@ -1051,6 +1051,16 @@ void ONNXImporter::populateNet(Net dstNet)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Scale layer allocate output with the first input shape
|
||||
if (total(outShapes[node_proto.input(0)]) < total(outShapes[node_proto.input(1)]))
|
||||
{
|
||||
opencv_onnx::NodeProto proto;
|
||||
proto.add_input(node_proto.input(1));
|
||||
proto.add_input(node_proto.input(0));
|
||||
proto.add_output(layerParams.name);
|
||||
node_proto = proto;
|
||||
}
|
||||
|
||||
if (isDiv)
|
||||
{
|
||||
LayerParams powerParams;
|
||||
|
@ -267,6 +267,13 @@ TEST_P(Test_ONNX_layers, ReduceMaxGlobal)
|
||||
testONNXModels("reduce_max");
|
||||
}
|
||||
|
||||
TEST_P(Test_ONNX_layers, Scale)
|
||||
{
|
||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||
testONNXModels("scale");
|
||||
}
|
||||
|
||||
TEST_P(Test_ONNX_layers, ReduceMean3D)
|
||||
{
|
||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target != DNN_TARGET_CPU)
|
||||
|
Loading…
Reference in New Issue
Block a user