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.

Extract Weights from Binary files

Malhar
Employee
1,903 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
1,903 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).

0 Kudos
HesamSH
New Contributor I
1,662 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.

0 Kudos
Malhar
Employee
1,903 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 ?

0 Kudos
Reply