PaddlePaddle / PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
https://paddleslim.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.56k stars 345 forks source link

运行离线量化脚本quant_post.py失败 #1895

Open xdd130 opened 1 month ago

xdd130 commented 1 month ago

使用PaddleSlim/demo/quant/quant_post/quant_post.py静态离线量化ch_ppocr_mobile_v2.0_rec_infer模型: image 执行命令如下所示: python quant_post.py --model_path ./ch_ppocr_mobile_v2.0_rec_infer --save_path ./quant_model/OCRv2_rec 但是我收到了下面的错误: image 请问我该如何正确离线量化。

FrostML commented 3 weeks ago

只看报错是模型中某个 transpose 操作输入的形状不对。一般排查思路需要根据模型结构来确认下报错位置,具体定位下出错原因