From 6409d062226b08b94b03d565774fe255ef62b12a Mon Sep 17 00:00:00 2001 From: Wenyu Date: Mon, 15 Aug 2022 10:39:34 +0800 Subject: [PATCH] update train config (#6633) --- .../configs/yolov5_s_qat_dis.yml | 8 ++--- .../configs/yolov6mt_reader.yml | 26 --------------- .../configs/yolov6mt_s_qat_dis.yaml | 16 ++++----- .../configs/yolov7_l_qat_dis.yaml | 16 ++++----- .../configs/yolov7_reader.yml | 26 --------------- .../auto_compression/configs/yolox_reader.yml | 26 --------------- .../configs/yolox_s_qat_dis.yaml | 33 ------------------- 7 files changed, 17 insertions(+), 134 deletions(-) delete mode 100644 deploy/auto_compression/configs/yolov6mt_reader.yml delete mode 100644 deploy/auto_compression/configs/yolov7_reader.yml delete mode 100644 deploy/auto_compression/configs/yolox_reader.yml delete mode 100644 deploy/auto_compression/configs/yolox_s_qat_dis.yaml diff --git a/deploy/auto_compression/configs/yolov5_s_qat_dis.yml b/deploy/auto_compression/configs/yolov5_s_qat_dis.yml index 60b98d948..7111e27d4 100644 --- a/deploy/auto_compression/configs/yolov5_s_qat_dis.yml +++ b/deploy/auto_compression/configs/yolov5_s_qat_dis.yml @@ -20,13 +20,11 @@ Quantization: - depthwise_conv2d TrainConfig: - train_iter: 5000 + train_iter: 3000 eval_iter: 1000 - learning_rate: - type: CosineAnnealingDecay - learning_rate: 0.00003 - T_max: 6000 + learning_rate: 0.00001 optimizer_builder: optimizer: type: SGD weight_decay: 4.0e-05 + target_metric: 0.365 diff --git a/deploy/auto_compression/configs/yolov6mt_reader.yml b/deploy/auto_compression/configs/yolov6mt_reader.yml deleted file mode 100644 index 9832845b2..000000000 --- a/deploy/auto_compression/configs/yolov6mt_reader.yml +++ /dev/null @@ -1,26 +0,0 @@ -metric: COCO -num_classes: 80 - -# Datset configuration -TrainDataset: - !COCODataSet - image_dir: train2017 - anno_path: annotations/instances_train2017.json - dataset_dir: dataset/coco/ - -EvalDataset: - !COCODataSet - image_dir: val2017 - anno_path: annotations/instances_val2017.json - dataset_dir: dataset/coco/ - -worker_num: 0 - -# preprocess reader in test -EvalReader: - sample_transforms: - - Decode: {} - - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1} - - Pad: {size: [640, 640], fill_value: [114., 114., 114.]} - - Permute: {} - batch_size: 1 diff --git a/deploy/auto_compression/configs/yolov6mt_s_qat_dis.yaml b/deploy/auto_compression/configs/yolov6mt_s_qat_dis.yaml index 12ab5b87d..35a86ad21 100644 --- a/deploy/auto_compression/configs/yolov6mt_s_qat_dis.yaml +++ b/deploy/auto_compression/configs/yolov6mt_s_qat_dis.yaml @@ -1,6 +1,6 @@ Global: - reader_config: configs/yolov6mt_reader.yml + reader_config: configs/yolov5_reader.yml input_list: ['image', 'scale_factor'] arch: YOLO Evaluation: True @@ -13,21 +13,19 @@ Distillation: loss: soft_label Quantization: - use_pact: true activation_quantize_type: 'moving_average_abs_max' quantize_op_types: - conv2d - depthwise_conv2d TrainConfig: - train_iter: 5000 + train_iter: 8000 eval_iter: 1000 - learning_rate: - type: CosineAnnealingDecay + learning_rate: + type: CosineAnnealingDecay learning_rate: 0.00003 - T_max: 6000 + T_max: 8000 optimizer_builder: - optimizer: + optimizer: type: SGD - weight_decay: 4.0e-05 - + weight_decay: 0.00004 diff --git a/deploy/auto_compression/configs/yolov7_l_qat_dis.yaml b/deploy/auto_compression/configs/yolov7_l_qat_dis.yaml index 408dfd47b..d233d6e76 100644 --- a/deploy/auto_compression/configs/yolov7_l_qat_dis.yaml +++ b/deploy/auto_compression/configs/yolov7_l_qat_dis.yaml @@ -1,6 +1,6 @@ Global: - reader_config: configs/yolov7_reader.yml + reader_config: configs/yolov5_reader.yml input_list: ['image', 'scale_factor'] arch: YOLO Evaluation: True @@ -13,21 +13,19 @@ Distillation: loss: soft_label Quantization: - use_pact: true activation_quantize_type: 'moving_average_abs_max' quantize_op_types: - conv2d - depthwise_conv2d TrainConfig: - train_iter: 5000 + train_iter: 8000 eval_iter: 1000 - learning_rate: - type: CosineAnnealingDecay + learning_rate: + type: CosineAnnealingDecay learning_rate: 0.00003 - T_max: 6000 + T_max: 8000 optimizer_builder: - optimizer: + optimizer: type: SGD - weight_decay: 4.0e-05 - + weight_decay: 0.00004 \ No newline at end of file diff --git a/deploy/auto_compression/configs/yolov7_reader.yml b/deploy/auto_compression/configs/yolov7_reader.yml deleted file mode 100644 index 9832845b2..000000000 --- a/deploy/auto_compression/configs/yolov7_reader.yml +++ /dev/null @@ -1,26 +0,0 @@ -metric: COCO -num_classes: 80 - -# Datset configuration -TrainDataset: - !COCODataSet - image_dir: train2017 - anno_path: annotations/instances_train2017.json - dataset_dir: dataset/coco/ - -EvalDataset: - !COCODataSet - image_dir: val2017 - anno_path: annotations/instances_val2017.json - dataset_dir: dataset/coco/ - -worker_num: 0 - -# preprocess reader in test -EvalReader: - sample_transforms: - - Decode: {} - - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1} - - Pad: {size: [640, 640], fill_value: [114., 114., 114.]} - - Permute: {} - batch_size: 1 diff --git a/deploy/auto_compression/configs/yolox_reader.yml b/deploy/auto_compression/configs/yolox_reader.yml deleted file mode 100644 index 6ad321a04..000000000 --- a/deploy/auto_compression/configs/yolox_reader.yml +++ /dev/null @@ -1,26 +0,0 @@ -metric: COCO -num_classes: 80 - -# Datset configuration -TrainDataset: - !COCODataSet - image_dir: train2017 - anno_path: annotations/instances_train2017.json - dataset_dir: dataset/coco/ - -EvalDataset: - !COCODataSet - image_dir: val2017 - anno_path: annotations/instances_val2017.json - dataset_dir: dataset/coco/ - -worker_num: 0 - -# preprocess reader in test -TestReader: - sample_transforms: - - Decode: {} - - Resize: {target_size: [640, 640], keep_ratio: True, interp: 1} - - Pad: {size: [640, 640], fill_value: [114., 114., 114.]} - - Permute: {} - batch_size: 1 diff --git a/deploy/auto_compression/configs/yolox_s_qat_dis.yaml b/deploy/auto_compression/configs/yolox_s_qat_dis.yaml deleted file mode 100644 index 6f5d97194..000000000 --- a/deploy/auto_compression/configs/yolox_s_qat_dis.yaml +++ /dev/null @@ -1,33 +0,0 @@ - -Global: - reader_config: configs/yolox_reader.yml - input_list: ['image', 'scale_factor'] - arch: YOLO - Evaluation: True - model_dir: ./yolox_s_300e_coco - model_filename: model.pdmodel - params_filename: model.pdiparams - -Distillation: - alpha: 1.0 - loss: soft_label - -Quantization: - use_pact: true - activation_quantize_type: 'moving_average_abs_max' - quantize_op_types: - - conv2d - - depthwise_conv2d - -TrainConfig: - train_iter: 5000 - eval_iter: 1000 - learning_rate: - type: CosineAnnealingDecay - learning_rate: 0.00003 - T_max: 6000 - optimizer_builder: - optimizer: - type: SGD - weight_decay: 4.0e-05 - -- GitLab