Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
54 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
2 Replies
Highlighted
Beginner
54 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
Highlighted
Employee
54 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