File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,11 @@ void InfEngineNgraphNet::setNodePtr(std::shared_ptr<ngraph::Node>* ptr) {
380
380
381
381
void InfEngineNgraphNet::release () {
382
382
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 (node) || ngraph::op::is_constant (node)) ) {
385
+ #else
383
386
if (!(node->is_parameter () || node->is_output () || node->is_constant ()) ) {
387
+ #endif
384
388
auto it = all_nodes.find (node->get_friendly_name ());
385
389
if (it != all_nodes.end ()) {
386
390
unconnectedNodes.erase (*(it->second ));
@@ -447,11 +451,19 @@ void InfEngineNgraphNet::createNet(Target targetId) {
447
451
ngraph::ResultVector outputs;
448
452
ngraph::ParameterVector inps;
449
453
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
450
457
if (node->is_parameter ()) {
458
+ #endif
451
459
auto parameter = std::dynamic_pointer_cast<ngraph::op::Parameter>(node);
452
460
inps.push_back (parameter);
453
461
}
462
+ #if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
463
+ else if (ngraph::op::is_output (node)) {
464
+ #else
454
465
else if (node->is_output ()) {
466
+ #endif
455
467
auto result = std::dynamic_pointer_cast<ngraph::op::Result>(node);
456
468
outputs.push_back (result);
457
469
}
You can’t perform that action at this time.
0 commit comments