_base_ = [
    '../_base_/models/encnet_r50-d8.py',
    '../_base_/datasets/my_dataset_model.py',
    '../_base_/default_runtime.py',
    '../_base_/schedules/schedule_40k_check_4000.py',
]

norm_cfg = dict(
    type='BN',
)

crop_size = (512, 1024)

data_preprocessor = dict(
    size=(512, 1024),
    mean=[
        94.94709810464303,
        61.72942233949928,
        75.93763705236906,
    ],
    std=[
        44.005506081132594,
        42.69595666984776,
        44.99354156225523,
    ],
    bgr_to_rgb=False,
)

model = dict(
    pretrained='./My_Local_Model/open_mmlab/resnet50_v1c.pth',
    backbone=dict(
        depth=50,
    ),
    data_preprocessor=dict(
        size=(512, 1024),
        mean=[
            94.94709810464303,
            61.72942233949928,
            75.93763705236906,
        ],
        std=[
            44.005506081132594,
            42.69595666984776,
            44.99354156225523,
        ],
        bgr_to_rgb=False,
    ),
    decode_head=dict(
        num_classes=36,
        loss_decode=dict(
            type='DiceLoss',
            use_sigmoid=False,
            loss_weight=1.0,
        ),
        align_corners=False,
    ),
    auxiliary_head=dict(
        num_classes=36,
        loss_decode=dict(
            type='DiceLoss',
            use_sigmoid=False,
            loss_weight=0.4,
        ),
        align_corners=False,
    ),
)

test_cfg = dict(
    crop_size=(512, 1024),
)

optim_wrapper = dict(
    type='OptimWrapper',
    _delete_=True,
    optimizer=dict(
        type='AdamW',
        lr=0.0001,
        weight_decay=0.0005,
    ),
    clip_grad=dict(
        max_norm=1,
        norm_type=2,
    ),
)

param_scheduler = [
    dict(
        type='LinearLR',
        start_factor=1e-06,
        by_epoch=False,
        begin=0,
        end=1500,
    ),
    dict(
        type='PolyLR',
        power=0.9,
        begin=1500,
        end=40000,
        eta_min=1e-05,
        by_epoch=False,
    ),
]

