Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I view weights in a .tflite file?

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 ?

like image 529
mingxin zhao Avatar asked Aug 31 '18 08:08

mingxin zhao


People also ask

How do you find the weights from a Tflite model?

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 open a Tflite file?

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.

How does TF Lite work?

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.


1 Answers

The Netron model viewer has nice view and export of data, as well as a nice network diagram view. https://github.com/lutzroeder/netron

like image 172
Jay Norwood Avatar answered Nov 10 '22 01:11

Jay Norwood