Skip to content

Commit a46ca98

Browse files
authored
Revert "Fixed removing is_parameter, is_constant, is_output"
1 parent e65e23b commit a46ca98

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

modules/dnn/src/ie_ngraph.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,7 @@ void InfEngineNgraphNet::setNodePtr(std::shared_ptr<ngraph::Node>* ptr) {
380380

381381
void InfEngineNgraphNet::release() {
382382
for (auto& node : components.back()) {
383-
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
384-
if (!(ngraph::op::is_parameter(node) || ngraph::op::is_output(ngraph) || ngraph::op::is_constant(ngraph)) ) {
385-
#else
386383
if (!(node->is_parameter() || node->is_output() || node->is_constant()) ) {
387-
#endif
388384
auto it = all_nodes.find(node->get_friendly_name());
389385
if (it != all_nodes.end()) {
390386
unconnectedNodes.erase(*(it->second));
@@ -451,19 +447,11 @@ void InfEngineNgraphNet::createNet(Target targetId) {
451447
ngraph::ResultVector outputs;
452448
ngraph::ParameterVector inps;
453449
for (auto& node : components.back()) {
454-
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
455-
if (ngraph::op::is_parameter(node)) {
456-
#else
457450
if (node->is_parameter()) {
458-
#endif
459451
auto parameter = std::dynamic_pointer_cast<ngraph::op::Parameter>(node);
460452
inps.push_back(parameter);
461453
}
462-
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
463-
else if (ngraph::op::is_output(node)) {
464-
#else
465454
else if (node->is_output()) {
466-
#endif
467455
auto result = std::dynamic_pointer_cast<ngraph::op::Result>(node);
468456
outputs.push_back(result);
469457
}

0 commit comments

Comments
 (0)