mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
Revert "Fixed removing is_parameter, is_constant, is_output"
This commit is contained in:
parent
e65e23b9c0
commit
a46ca98c57
@ -380,11 +380,7 @@ void InfEngineNgraphNet::setNodePtr(std::shared_ptr<ngraph::Node>* 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(ngraph) || ngraph::op::is_constant(ngraph)) ) {
|
||||
#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));
|
||||
@ -451,19 +447,11 @@ 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<ngraph::op::Parameter>(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<ngraph::op::Result>(node);
|
||||
outputs.push_back(result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user