mbv3_qat_dis.yaml 2.1 KB
Newer Older
R
RachelXu7 已提交
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
# global configs
Global:
  output_dir: ./output/
  device: gpu
  model_dir: ./MobileNetV3_large_x1_0_infer
  model_filename: inference.pdmodel
  params_filename: inference.pdiparams
  input_name: inputs
  
Distillation:
  alpha: 1.0
  loss: soft_label

Quantization:
  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
  weight_bits: 8

TrainConfig:
  epochs: 2
R
RachelXu7 已提交
30
  eval_iter: 5000
R
RachelXu7 已提交
31 32 33 34
  learning_rate: 0.001
  optimizer_builder:
    optimizer:
      type: Momentum
R
RachelXu7 已提交
35
    weight_decay: 0.00005
R
RachelXu7 已提交
36
  origin_metric: 0.7532
R
RachelXu7 已提交
37 38 39 40 41 42
  

DataLoader:
  Train:
    dataset:
      name: ImageNetDataset
R
RachelXu7 已提交
43 44
      image_root: ./dataset/ILSVRC2012/
      cls_label_path: ./dataset/ILSVRC2012/train_list.txt
R
RachelXu7 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
      transform_ops:
        - DecodeImage:
            to_rgb: True
            channel_first: False
        - RandCropImage:
            size: 224
        - RandFlipImage:
            flip_code: 1
        - AutoAugment:
        - NormalizeImage:
            scale: 1.0/255.0
            mean: [0.485, 0.456, 0.406]
            std: [0.229, 0.224, 0.225]
            order: ''

    sampler:
      name: DistributedBatchSampler
      batch_size: 128
      drop_last: False
      shuffle: True
    loader:
      num_workers: 8
      use_shared_memory: True

  Eval:
    dataset: 
      name: ImageNetDataset
R
RachelXu7 已提交
72 73
      image_root: ./dataset/ILSVRC2012/
      cls_label_path: ./dataset/ILSVRC2012/val_list.txt
R
RachelXu7 已提交
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
      transform_ops:
        - DecodeImage:
            to_rgb: True
            channel_first: False
        - ResizeImage:
            resize_short: 256
        - CropImage:
            size: 224
        - NormalizeImage:
            scale: 1.0/255.0
            mean: [0.485, 0.456, 0.406]
            std: [0.229, 0.224, 0.225]
            order: ''
    sampler:
      name: DistributedBatchSampler
      batch_size: 32
      drop_last: False
      shuffle: False
    loader:
      num_workers: 4
      use_shared_memory: True