Open TinyQi opened 3 months ago
我使用文档中:https://github.com/PaddlePaddle/PaddleSlim/tree/release/2.6/example/auto_compression/ocr的量化脚本进行量化,经过训练后模型的精度下降很大,请问我哪里做错了嘛?
精度的前后对比如下:
我使用的配置文件如下: Global: model_type: det model_dir: /share/disk3/xcq/02.model_cache/pretrain_models/ch_PP-OCRv3_det_infer_bak/ model_filename: inference.pdmodel params_filename: inference.pdiparams algorithm: DB
Distillation: alpha: 1.0 loss: l2
QuantAware: use_pact: true activation_bits: 8 is_full_quantize: false onnx_format: True activation_quantize_type: moving_average_abs_max weight_quantize_type: channel_wise_abs_max not_quant_pattern:
TrainConfig: epochs: 3 eval_iter: 200 learning_rate: type: CosineAnnealingDecay learning_rate: 0.00005 optimizer_builder: optimizer: type: Adam weight_decay: 5.0e-05
PostProcess: name: DBPostProcess thresh: 0.3 box_thresh: 0.6 max_candidates: 1000 unclip_ratio: 1.5
Metric: name: DetMetric main_indicator: hmean
Train: dataset: name: SimpleDataSet data_dir: /share/disk3/xcq/01.ImageData/010.OpenSourceData/icdar2015/text_localization/ label_file_list:
Eval: dataset: name: SimpleDataSet data_dir: /share/disk3/xcq/01.ImageData/010.OpenSourceData/icdar2015/text_localization/ label_file_list:
我看上一个issue的log看起来是量化训练,可以参考 https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/post_training_quantization/detection/post_quant.py#L75 这个示例使用离线量化看下效果
我使用文档中:https://github.com/PaddlePaddle/PaddleSlim/tree/release/2.6/example/auto_compression/ocr的量化脚本进行量化,经过训练后模型的精度下降很大,请问我哪里做错了嘛?
精度的前后对比如下:![image](https://github.com/PaddlePaddle/PaddleSlim/assets/28993936/f98745e4-dc6d-4e65-aee1-12d5f4a8bb9d)
我使用的配置文件如下: Global: model_type: det model_dir: /share/disk3/xcq/02.model_cache/pretrain_models/ch_PP-OCRv3_det_infer_bak/ model_filename: inference.pdmodel params_filename: inference.pdiparams algorithm: DB
Distillation: alpha: 1.0 loss: l2
QuantAware: use_pact: true activation_bits: 8 is_full_quantize: false onnx_format: True activation_quantize_type: moving_average_abs_max weight_quantize_type: channel_wise_abs_max not_quant_pattern:
TrainConfig: epochs: 3 eval_iter: 200 learning_rate: type: CosineAnnealingDecay learning_rate: 0.00005 optimizer_builder: optimizer: type: Adam weight_decay: 5.0e-05
PostProcess: name: DBPostProcess thresh: 0.3 box_thresh: 0.6 max_candidates: 1000 unclip_ratio: 1.5
Metric: name: DetMetric main_indicator: hmean
Train: dataset: name: SimpleDataSet data_dir: /share/disk3/xcq/01.ImageData/010.OpenSourceData/icdar2015/text_localization/ label_file_list:
Eval: dataset: name: SimpleDataSet data_dir: /share/disk3/xcq/01.ImageData/010.OpenSourceData/icdar2015/text_localization/ label_file_list: