Alien Queen
DIIDevHeads IoT Integration Server
•Created by Enthernet Code on 8/13/2024 in #middleware-and-os
Efficiently Converting and Quantizing a Trained Model to TensorFlow Lite
TensorFlow Lite also supports other types of
quantization
, such as full
integer quantization or float16
quantization. If you want more control over how the quantization
is applied, you can specify the type of quantization
during conversion.
For instance, if you want to use full
integer quantization, you can modify your code to be like this
This will convert both the weights and activations to int8
, which is often the most efficient for microcontrollers
. Although quantization the accuracy of your model may be affected so you would ahv to test it again to ensure it meets your accuracy requirements, you can test the original and quantized to see if theres any notable difference in model capability.5 replies