Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

IENetwork has no attribute 'layers'

NisalJ
Beginner
606 Views

Hi,

 

I updated my OpenVINO version to 2021.4 from 2020.3

 

There is an issue when run the script,

 

unsupported_layers = [l for l in self.network.layers.keys() if l not in supported_layers]
AttributeError: 'openvino.inference_engine.ie_api.IENetwork' object has no attribute 'layers'

 

Could you provide an alternative solutions for this?


Thanks

0 Kudos
2 Replies
Wan_Intel
Moderator
583 Views

Hi NisalJ,

Thanks for reaching out to us.

ie_api.IENetwork.layers is deprecated starting from OpenVINO™ toolkit 2021.2.

Use get_ordered_ops() methods from nGraph Python API to get a topologically sorted list of its graph nodes.

 

You may refer to this article for more information.

 

 

Regards,

Wan

 

0 Kudos
Wan_Intel
Moderator
566 Views

Hi NisalJ,

Thanks for your question. This thread will no longer be monitored since we have provided information. If you need any additional information from Intel, please submit a new question.

 

 

Best regards,

Wan


0 Kudos
Reply