mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #20335 from SamFC10:concat-const-input
This commit is contained in:
commit
b699fe7a9d
@ -1792,6 +1792,23 @@ void ONNXImporter::handleNode(const opencv_onnx::NodeProto& node_proto_)
|
|||||||
addConstant(layerParams.name, concatenated[0]);
|
addConstant(layerParams.name, concatenated[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < node_proto.input_size(); ++i)
|
||||||
|
{
|
||||||
|
if (constBlobs.find(node_proto.input(i)) != constBlobs.end())
|
||||||
|
{
|
||||||
|
LayerParams constParams;
|
||||||
|
constParams.name = node_proto.input(i);
|
||||||
|
constParams.type = "Const";
|
||||||
|
constParams.blobs.push_back(getBlob(node_proto, i));
|
||||||
|
|
||||||
|
opencv_onnx::NodeProto proto;
|
||||||
|
proto.add_output(constParams.name);
|
||||||
|
addLayer(constParams, proto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (layer_type == "Resize")
|
else if (layer_type == "Resize")
|
||||||
{
|
{
|
||||||
|
@ -327,6 +327,7 @@ TEST_P(Test_ONNX_layers, Concatenation)
|
|||||||
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
}
|
}
|
||||||
testONNXModels("concatenation");
|
testONNXModels("concatenation");
|
||||||
|
testONNXModels("concat_const_blobs");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Eltwise3D)
|
TEST_P(Test_ONNX_layers, Eltwise3D)
|
||||||
|
Loading…
Reference in New Issue
Block a user