alibaba / alibaba/TinyNeuralNetwork
A PTQ tflite model fails to pass benchmark test
- Dominant language
- Python
- Stars
- 879
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
My use case:
Apply post training quantization to a pth model and convert to tflite. The generated tflite model fails to pass benchmark test with following error message:
STARTING!
Log parameter values verbosely: [0]
Graph: [out/ptq_model.tflite]
Loaded model out/ptq_model.tflite
ERROR: tensorflow/lite/kernels/concatenation.cc:179 t->params.scale != output->params.scale (3 != -657359264)
ERROR: Node number 154 (CONCATENATION) failed to prepare.
Failed to allocate tensors!
Benchmarking failed.
Pls refer to the attachment. Thanks.
[test.zip](https://github.com/alibaba/TinyNeuralNetwork/files/9088693/test.zip)
Contributor guide
Research direction
Start by unpacking test.zip and reproducing the benchmark failure with out/ptq_model.tflite. Trace the post-training quantization and model conversion path to investigate the CONCATENATION scale mismatch; the issue is done when the generated TFLite model passes the benchmark test without the tensor-allocation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100