PaddleSlim
PaddleSlim copied to clipboard
PaddleSlim is an open-source library for deep model compression and architecture search.
版本:paddleslim2.5 paddledet2.6 paddleYOLO2.5训练出来的 yolov8s模型,根据示例进行自动压缩出错。 我模型导出来,模型输入 为image,这里报错,说data没有image这个属性;该如何修改?? 
环境: paddledet 2.6.0 paddlepaddle-gpu 2.4.2 paddleslim 2.6.0 复现步骤: 尝试使用文档中提供的已自动压缩的RT-DETR-R50,下载并解压 https://github.com/PaddlePaddle/PaddleSlim/blob/cbc4d1d8a809f79ae3b6aae776ec4b2cba66ce07/example/auto_compression/detection/README.md?plain=1#L52 使用GPU和fp32模式推理图片,具体指令: `python3 paddle_inference_eval.py --model_path=output/rtdetr_r50vd_6x_coco_quant --reader_config=configs/rtdetr_reader.yml --image_file=000000144941.jpg --device=GPU --precision=fp32` 推理结果是: ``` W0322 15:17:07.880046 23290 analysis_predictor.cc:1395] The one-time configuration of analysis predictor...
我是用paddle.save(net.state_dict(),path)来进行保存,发现剪枝后模型比剪枝前的模型都要大,但是通过paddle.summary(net, (1, 3, 32, 32))查看模型确实变小了 paddlepaddle=2.6.0 paddleslim=2.6.0 以下是我的代码: from __future__ import print_function import paddle from paddle.vision.models import mobilenet_v1 net = mobilenet_v1(pretrained=False) paddle.summary(net, (1, 3, 32, 32)) import paddle.vision.transforms as T...
描述:定义新的FP8 observer,目前只支持e4m3格式 功能:统计量化对象的abs_max,并根据abs_max和fp8格式的取值范围计算scale PaddleSlim设计逻辑: paddleslim/quant/observers/fp8uniform.py 定义FP8UniformObserverLayer类用以统计量化对象的abs_max以及根据用户选择的要量化到的FP8类型设置正确的量化区间,并最终计算出scale,方便FP8LinearQuanterDequanter进行量化和反量化操作 paddleslim/quant/observers/__init__.py 将FP8UniformObserver添加到__init__中方便外部调用
我使用文档中: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:...
请问,压缩V4检测 server模型,需要使用什么数据集? 我使用自有的数据,验证精度不佳。我想请问我可以使用什么数据集进行验证,能尽可能保持模型的精度呢?
Traceback (most recent call last): File "F:\hzk\PaddleOCR-2.7.5\PPOCRLabel\PPOCRLabel.py", line 2843, in sys.exit(main()) File "F:\hzk\PaddleOCR-2.7.5\PPOCRLabel\PPOCRLabel.py", line 2831, in main app, _win = get_main_app(sys.argv) File "F:\hzk\PaddleOCR-2.7.5\PPOCRLabel\PPOCRLabel.py", line 2821, in get_main_app win = MainWindow(lang=args.lang,...
1、BMN模型和AttentionLSTM模型是否有量化压缩和蒸馏的方案?训练完成的AttentionLSTM模型的模型参数和计算量如何计算? 2、模型使用自动压缩,参数文件大小没有变化,如何处理这种情况?
----------- Running Arguments ----------- arch: YOLOv5 dataset_dir: /mnt/data01/luoshiyong/data/liugang model_dir: /mnt/data01/luoshiyong/code/PaddleSlim-release-2.5/yolov5out/best.onnx skip_tensors: None train_anno_path: annotations/instances1_train.json train_image_dir: images/train val_anno_path: annotations/instances1_val.json val_image_dir: images/val ------------------------------------------ loading annotations into memory... Done (t=0.22s) creating index... index...
修改Uniform Observer支持FP8量化  