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.

Extract Weights from Binary files

Malhar
Employee
662 Views

Hi, I am looking for a python API implemented to extract the layer information along with its weights and biases. Is there any API support to extract information from graphs ?

0 Kudos
3 Replies
J__Niko
Beginner
662 Views

1) Load model into IENetwork

2) net.layers[LAYER_ID].weights is a dict with keys "biases" and "weights"

3) If you used FP32, just copy those floats. If you used FP16, you need to convert those integers into binary and calculate floats from the integers (1bit sign, 5bit exponent, 10bit mantissa).

HesamSH
New Contributor I
421 Views

Hello Niko,

 

The IENetwork object doesn't seem to have any attribute called "layers".

Could you provide more detailed soloution on this matter?

 

Thanks in advance.

Malhar
Employee
662 Views

Thanks for the answer. Where can I find the list of attributes which we can use with net.layers ? Is there any cheat-sheet available ? or any such documentation ?

Reply