Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5762 Discussions

IR model output order not preserved in python IENetwork.outputs() call

Hawkes__Rycharde
New Contributor I
311 Views

When calling IENetwork.outputs() the resulting list is sorted by the name of the output and does not preserve the order specified using the model optimiser --output option (even though in python the resulting list is an OrderedDict...).  Is there any way to get the output order to be preserved when loading the model?

I'm using 2020.2.117

Thanks

 

0 Kudos
4 Replies
Munesh_Intel
Moderator
301 Views

Hi Rycharde,

 

Thanks for reaching out.

Reading networks using IENetwork constructor is deprecated. More information is available here:

https://docs.openvinotoolkit.org/2020.2/ie_python_api/classie__api_1_1IENetwork.html#details


I would suggest you try reading the network using the following function, ie_api.IECore.read_network.

https://docs.openvinotoolkit.org/2020.4/ie_python_api/classie__api_1_1IECore.html#a0d69c298618fab3a0...


On a separate note, we would also like you to share some information regarding the function that you’re using as well.


Regards,

Munesh


Hawkes__Rycharde
New Contributor I
298 Views

Apologies, I am actually already using IECore.read_network().  What more information do you need?  I provide the two mandatory parameters and calling IENetwork.outputs() on the value returned by read_network() provides the outputs in alphabetical order, not the order as expressed in the IR xml.  I've coded around the matter, but it seems odd that the order is not respected, especially since the python API uses an OrderedDict.

UPDATE: I've since used compile_tool with the same IR for use with a different application and observe that outputs are sorted alphabetically.  So this must be done by the model optimiser and not in the API.  Presumably the sorting of outputs is intended but there is no documentation to confirm this.

Thanks,

Rych

 

 

Munesh_Intel
Moderator
290 Views

Hi Rycharde,

Thanks for providing updates. Please share Inference Engine application code, as well as details about your model (topology) and if possible, please share the Intermediate Representation (IR) files for us to reproduce your issue.


Regards,

Munesh


Munesh_Intel
Moderator
278 Views

Hi Rycharde,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored. 


Regards,

Munesh


Reply