forked from PaddlePaddle/FastDeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
efficientnetb0_quant.yaml
50 lines (46 loc) · 1.05 KB
/
efficientnetb0_quant.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Global:
model_dir: ./EfficientNetB0_small_infer/
format: 'paddle'
model_filename: inference.pdmodel
params_filename: inference.pdiparams
qat_image_path: ./ImageNet_val_640
ptq_image_path: ./ImageNet_val_640
input_list: ['inputs']
qat_preprocess: cls_image_preprocess
ptq_preprocess: cls_image_preprocess
qat_batch_size: 32
Distillation:
alpha: 1.0
loss: l2
node:
- softmax_0.tmp_0
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:
- skip_quant
quantize_op_types:
- conv2d
- depthwise_conv2d
- matmul
- matmul_v2
weight_bits: 8
TrainConfig:
epochs: 1
eval_iter: 500
learning_rate:
type: CosineAnnealingDecay
learning_rate: 0.015
T_max: 8000
optimizer_builder:
optimizer:
type: Momentum
weight_decay: 0.00002
origin_metric: 0.7738
PTQ:
calibration_method: 'avg' # option: avg, abs_max, hist, KL, mse
skip_tensor_list: None