diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index 6d991cd010..a778576afd 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -2228,7 +2228,11 @@ struct Net::Impl auto ieInpNode = inputNodes[i].dynamicCast(); CV_Assert(oid < ieInpNode->node->get_output_size()); - inputNodes[i] = Ptr(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid/*, false*/))); +#if INF_ENGINE_VER_MAJOR_GT(2020030000) + inputNodes[i] = Ptr(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid))); +#else + inputNodes[i] = Ptr(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid, false))); +#endif } if (layer->supportBackend(preferableBackend))