apps_mlearning_tflite-micro/tensorflow
Xie Lin 12699e7952 Tflm: Add per-channel quantization support to FULLY_CONNECTED operator
This commit fixes the inference accuracy issue in tflite-micro
by adding per-channel quantization support to the FULLY_CONNECTED operator.

Root Cause:
- The fork only supported per-tensor quantization (single scale/zero_point
  for entire weight tensor)
- Upstream added per-channel quantization (independent scale/zero_point per
  output channel) which provides better accuracy

Changes:
1. tensorflow/lite/micro/kernels/fully_connected.h
   - Added is_per_channel flag
   - Added per_channel_output_multiplier array
   - Added per_channel_output_shift array

2. tensorflow/lite/micro/kernels/fully_connected_common.cc
   - Updated quantization parameter calculation to support per-channel

3. tensorflow/lite/micro/kernels/fully_connected.cc
   - Added conditional execution path for per-channel quantization
   - Preserved TFLITE_MODEL_COMPILER customization

Signed-off-by: Xie Lin <xielin3@xiaomi.com>
2026-04-20 14:48:10 +08:00
..
lite Tflm: Add per-channel quantization support to FULLY_CONNECTED operator 2026-04-20 14:48:10 +08:00
BUILD More cleanup of the BUILD files. (#9) 2021-04-17 06:44:37 +00:00
extra_rules.bzl Download Cadence Nature DSP from GitHub (#2241) 2023-10-05 17:06:55 +00:00
workspace.bzl Update Flatbuffer version to 2.0.6 and generate schema local. (#1374) 2022-08-25 18:01:35 +00:00