Wrong quantized_dimension (axis) when "per-channel" quantization #66081
Labels
comp:lite
TF Lite related issues
TF 2.15
For issues related to 2.15.x
TFLiteConverter
For issues related to TFLite converter
type:bug
Bug
WIP
1. System information
pip install tensorflow==2.15.0
2. Code
3. Failure after conversion
The conversion is successful, but the generated model is wrong: the inferred output (
tflite_inference
) is all the same value in the fully int8 quantized model and I think it could be because quantization per-channel is performing per-batchaxis instead:If I inspect the .tflite model, I found that in each operation (for example convolution) the number of
scale
andzero_point
values are the same as number of axis=0 (batch i.e 256) not the number of channels (axis=-1 i.e 512)...
I miss one
quantized_dimension
parameter, as stated in docs: https://www.tensorflow.org/lite/performance/quantization_spec#per-axis_vs_per-tensorThe text was updated successfully, but these errors were encountered: