mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Quantization] Improve the usage of fastdeploy tools (#722)
Improve the usage of fastdeploy tools
This commit is contained in:
@@ -46,12 +46,12 @@ wget https://bj.bcebos.com/paddlehub/fastdeploy/COCO_val_320.tar.gz
|
||||
tar -xvf COCO_val_320.tar.gz
|
||||
```
|
||||
|
||||
##### 2. Run fastdeploy --auto_compress command to compress the model
|
||||
##### 2. Run fastdeploy compress command to compress the model
|
||||
|
||||
The following command is to quantize the yolov5s model, if developers want to quantize other models, replace the config_path with other model configuration files in the configs folder.
|
||||
|
||||
```shell
|
||||
fastdeploy --auto_compress --config_path=./configs/detection/yolov5s_quant.yaml --method='PTQ' --save_dir='./yolov5s_ptq_model/'
|
||||
fastdeploy compress --config_path=./configs/detection/yolov5s_quant.yaml --method='PTQ' --save_dir='./yolov5s_ptq_model/'
|
||||
```
|
||||
|
||||
[notice] PTQ is short for post-training quantization
|
||||
@@ -83,14 +83,14 @@ wget https://bj.bcebos.com/paddlehub/fastdeploy/COCO_val_320.tar.gz
|
||||
tar -xvf COCO_val_320.tar.gz
|
||||
```
|
||||
|
||||
##### 2.Use fastdeploy --auto_compress command to compress models
|
||||
##### 2.Use fastdeploy compress command to compress models
|
||||
|
||||
The following command is to quantize the yolov5s model, if developers want to quantize other models, replace the config_path with other model configuration files in the configs folder.
|
||||
|
||||
```shell
|
||||
# Please specify the single card GPU before training, otherwise it may get stuck during the training process.
|
||||
export CUDA_VISIBLE_DEVICES=0
|
||||
fastdeploy --auto_compress --config_path=./configs/detection/yolov5s_quant.yaml --method='QAT' --save_dir='./yolov5s_qat_model/'
|
||||
fastdeploy compress --config_path=./configs/detection/yolov5s_quant.yaml --method='QAT' --save_dir='./yolov5s_qat_model/'
|
||||
```
|
||||
|
||||
##### 3.Parameters
|
||||
|
||||
Reference in New Issue
Block a user