ResNet50_fp16.yaml 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
mode: 'train'
ARCHITECTURE:
    name: 'ResNet50'

pretrained_model: ""
model_save_dir: "./output/"
classes_num: 1000
total_images: 1281167
save_interval: 1
validate: True
valid_interval: 1
epochs: 120
topk: 5
H
huangxu96 已提交
14
is_distributed: True
15

H
huangxu96 已提交
16 17 18 19 20
use_dali: True
use_gpu: True
data_format: "NHWC"
image_channel: &image_channel 4
image_shape: [*image_channel, 224, 224]
21 22 23 24

use_mix: False
ls_epsilon: -1

H
huangxu96 已提交
25 26 27 28 29 30
# mixed precision training
AMP:
    scale_loss: 128.0
    use_dynamic_loss_scaling: True
    use_pure_fp16: &use_pure_fp16 True

31 32 33 34 35 36 37 38 39 40 41
LEARNING_RATE:
    function: 'Piecewise'
    params:
        lr: 0.1
        decay_epochs: [30, 60, 90]
        gamma: 0.1

OPTIMIZER:
    function: 'Momentum'
    params:
        momentum: 0.9
H
huangxu96 已提交
42
        multi_precision: *use_pure_fp16
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
    regularizer:
        function: 'L2'
        factor: 0.000100

TRAIN:
    batch_size: 256
    num_workers: 4
    file_list: "./dataset/ILSVRC2012/train_list.txt"
    data_dir: "./dataset/ILSVRC2012/"
    shuffle_seed: 0
    transforms:
        - DecodeImage:
            to_rgb: True
            to_np: False
            channel_first: False
        - RandCropImage:
            size: 224
        - RandFlipImage:
            flip_code: 1
        - NormalizeImage:
            scale: 1./255.
            mean: [0.485, 0.456, 0.406]
            std: [0.229, 0.224, 0.225]
            order: ''
H
huangxu96 已提交
67 68
            output_fp16: *use_pure_fp16
            channel_num: *image_channel
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
        - ToCHWImage:

VALID:
    batch_size: 64
    num_workers: 4
    file_list: "./dataset/ILSVRC2012/val_list.txt"
    data_dir: "./dataset/ILSVRC2012/"
    shuffle_seed: 0
    transforms:
        - DecodeImage:
            to_rgb: True
            to_np: False
            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: ''
        - ToCHWImage: