PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.38k stars 2.84k forks source link

ppyoloe-m在线量化训练,评估指标为0 #7997

Open xgySTATISICT opened 1 year ago

xgySTATISICT commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

使用环境:paddlecloud/paddledetection:2.4-gpu-cuda11.2-cudnn8-latest T4 1.使用自有数据集fine-tuning ppyoloe-m 模型,浮点型训练过程正常、评估正常; 2.基于上述训练模型作量化训练,使用相同数据集,训练过程正常但评估指标全为0

量化配置文件如下:

pretrain_weights: output/ppyoloe_crn_m_300e_coco/best_model  # 训练的浮点模型
slim: QAT

QAT:
  quant_config: {
    'weight_quantize_type': 'channel_wise_abs_max', 'activation_quantize_type': 'moving_average_abs_max',
    'weight_bits': 8, 'activation_bits': 8, 'dtype': 'int8', 'window_size': 10000, 'moving_rate': 0.9,
    'quantizable_layer_type': ['Conv2D', 'Linear']}
  print_model: True

epoch: 30
snapshot_epoch: 1
LearningRate:
  base_lr: 0.0005
  schedulers:
  - !PiecewiseDecay
    gamma: 0.1
    milestones:
    - 10
    - 20
  - !LinearWarmup
    start_factor: 0.
    steps: 100

TrainReader:
   batch_size: 4
yang-yuan-code commented 1 month ago

您好,请问解决了吗,我遇到了同样的问题