|
|
|
@ -2196,9 +2196,22 @@ struct Net::Impl : public detail::NetImplBase |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
auto ieInpNode = inputNodes[i].dynamicCast<InfEngineNgraphNode>(); |
|
|
|
|
CV_Assert(oid < ieInpNode->node->get_output_size()); |
|
|
|
|
const auto& ngraph_input_node = ieInpNode->node; |
|
|
|
|
CV_LOG_DEBUG(NULL, "DNN/IE: bind output port " << lid << ":" << oid << " (" << ngraph_input_node->get_friendly_name() << ":" << ngraph_input_node->get_type_info().name << ")"); |
|
|
|
|
|
|
|
|
|
// Handle parameters from other subnets. Output port is not used in this case
|
|
|
|
|
if ((ngraph::op::is_parameter(ngraph_input_node) || ngraph::op::is_constant(ngraph_input_node)) && |
|
|
|
|
ngraph_input_node->get_output_size() == 1) |
|
|
|
|
{ |
|
|
|
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ngraph_input_node)); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
CV_CheckLT((size_t)oid, ngraph_input_node->get_output_size(), ""); |
|
|
|
|
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) |
|
|
|
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node)); |
|
|
|
|
// FIXIT refactor ".initNgraph()" API to use Output<Node>
|
|
|
|
|
// WA: use Concat to emulate Identity operation with requested output port
|
|
|
|
|
auto oid_node = std::make_shared<ngraph::op::Concat>(ngraph::OutputVector {ngraph_input_node->output(oid)}, 0); |
|
|
|
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(oid_node)); |
|
|
|
|
#elif INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_3) |
|
|
|
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid))); |
|
|
|
|
#else |
|
|
|
|