未验证 提交 6409d062 编写于 作者: W Wenyu 提交者: GitHub

update train config (#6633)

上级 113ff463
...@@ -20,13 +20,11 @@ Quantization: ...@@ -20,13 +20,11 @@ Quantization:
- depthwise_conv2d - depthwise_conv2d
TrainConfig: TrainConfig:
train_iter: 5000 train_iter: 3000
eval_iter: 1000 eval_iter: 1000
learning_rate: learning_rate: 0.00001
type: CosineAnnealingDecay
learning_rate: 0.00003
T_max: 6000
optimizer_builder: optimizer_builder:
optimizer: optimizer:
type: SGD type: SGD
weight_decay: 4.0e-05 weight_decay: 4.0e-05
target_metric: 0.365
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
Global: Global:
reader_config: configs/yolov6mt_reader.yml reader_config: configs/yolov5_reader.yml
input_list: ['image', 'scale_factor'] input_list: ['image', 'scale_factor']
arch: YOLO arch: YOLO
Evaluation: True Evaluation: True
...@@ -13,21 +13,19 @@ Distillation: ...@@ -13,21 +13,19 @@ Distillation:
loss: soft_label loss: soft_label
Quantization: Quantization:
use_pact: true
activation_quantize_type: 'moving_average_abs_max' activation_quantize_type: 'moving_average_abs_max'
quantize_op_types: quantize_op_types:
- conv2d - conv2d
- depthwise_conv2d - depthwise_conv2d
TrainConfig: TrainConfig:
train_iter: 5000 train_iter: 8000
eval_iter: 1000 eval_iter: 1000
learning_rate: learning_rate:
type: CosineAnnealingDecay type: CosineAnnealingDecay
learning_rate: 0.00003 learning_rate: 0.00003
T_max: 6000 T_max: 8000
optimizer_builder: optimizer_builder:
optimizer: optimizer:
type: SGD type: SGD
weight_decay: 4.0e-05 weight_decay: 0.00004
Global: Global:
reader_config: configs/yolov7_reader.yml reader_config: configs/yolov5_reader.yml
input_list: ['image', 'scale_factor'] input_list: ['image', 'scale_factor']
arch: YOLO arch: YOLO
Evaluation: True Evaluation: True
...@@ -13,21 +13,19 @@ Distillation: ...@@ -13,21 +13,19 @@ Distillation:
loss: soft_label loss: soft_label
Quantization: Quantization:
use_pact: true
activation_quantize_type: 'moving_average_abs_max' activation_quantize_type: 'moving_average_abs_max'
quantize_op_types: quantize_op_types:
- conv2d - conv2d
- depthwise_conv2d - depthwise_conv2d
TrainConfig: TrainConfig:
train_iter: 5000 train_iter: 8000
eval_iter: 1000 eval_iter: 1000
learning_rate: learning_rate:
type: CosineAnnealingDecay type: CosineAnnealingDecay
learning_rate: 0.00003 learning_rate: 0.00003
T_max: 6000 T_max: 8000
optimizer_builder: optimizer_builder:
optimizer: optimizer:
type: SGD type: SGD
weight_decay: 4.0e-05 weight_decay: 0.00004
\ No newline at end of file
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
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
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册