Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Malhar
Employee
330 Views

Extract Weights from Binary files

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
330 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
Novice
89 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
330 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