From: Ilya Churaev Date: Fri, 17 Jul 2020 11:34:06 +0000 (+0300) Subject: Fixed removing is_parameter, is_constant, is_output X-Git-Tag: submit/tizen/20210224.033012~2^2~108^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aaf65bb3af638e2d341f795754fae2661fdf3cc3;p=platform%2Fupstream%2Fopencv.git Fixed removing is_parameter, is_constant, is_output --- diff --git a/modules/dnn/src/ie_ngraph.cpp b/modules/dnn/src/ie_ngraph.cpp index f02ef45..aea2955 100644 --- a/modules/dnn/src/ie_ngraph.cpp +++ b/modules/dnn/src/ie_ngraph.cpp @@ -380,7 +380,11 @@ void InfEngineNgraphNet::setNodePtr(std::shared_ptr* ptr) { void InfEngineNgraphNet::release() { for (auto& node : components.back()) { +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) + if (!(ngraph::op::is_parameter(node) || ngraph::op::is_output(node) || ngraph::op::is_constant(node)) ) { +#else if (!(node->is_parameter() || node->is_output() || node->is_constant()) ) { +#endif auto it = all_nodes.find(node->get_friendly_name()); if (it != all_nodes.end()) { unconnectedNodes.erase(*(it->second)); @@ -447,11 +451,19 @@ void InfEngineNgraphNet::createNet(Target targetId) { ngraph::ResultVector outputs; ngraph::ParameterVector inps; for (auto& node : components.back()) { +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) + if (ngraph::op::is_parameter(node)) { +#else if (node->is_parameter()) { +#endif auto parameter = std::dynamic_pointer_cast(node); inps.push_back(parameter); } +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) + else if (ngraph::op::is_output(node)) { +#else else if (node->is_output()) { +#endif auto result = std::dynamic_pointer_cast(node); outputs.push_back(result); }