I get the pre-trained .pb file of MobileNet and find it's not quantized while the fully quantized model should be converted into .tflite format. Since I'm not familiar with tools for mobile app developing, how can I get the fully quantized weights of MobileNet from .tflite file. More precisely, how can I extract quantized parameters and view its numerical values ?
Create a tflite interpreter and (optionally) perform inference. tflite_interpreter. get_tensor_details() will give a list of dictionaries that have weights, biases, their scales, zero_points..etc.
How do I inspect a . tflite file? Netron is the easiest way to visualize a TensorFlow Lite model. If Netron cannot open your TensorFlow Lite model, you can try the visualize.py script in our repository.
The TensorFlow Lite converter: that converts TensorFlow models into an efficient form and creates optimizations to improve binary size and performance. The TensorFlow Lite interpreter: runs the optimized models on different types of hardware, including mobile phones, embedded Linux devices, and microcontrollers.
The Netron model viewer has nice view and export of data, as well as a nice network diagram view. https://github.com/lutzroeder/netron
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With