_base_ = [
    '../_base_/models/dpt_vit-b16.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 = (1024, 1024)

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

model = dict(
    data_preprocessor=dict(
        size=(1024, 1024),
        mean=[
            94.94709810464303,
            61.72942233949928,
            75.93763705236906,
        ],
        std=[
            44.005506081132594,
            42.69595666984776,
            44.99354156225523,
        ],
        bgr_to_rgb=False,
    ),
    pretrained='./My_Local_Model/pretrain/vit-b16_p16_224-80ecf9dd.pth',
    decode_head=dict(
        loss_decode=dict(
            type='DiceLoss',
            use_sigmoid=False,
            loss_weight=1.0,
        ),
        num_classes=36,
    ),
)

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,
    ),
    paramwise_cfg=dict(
        pos_embed=dict(
            decay_mult=0.0,
        ),
        cls_token=dict(
            decay_mult=0.0,
        ),
        norm=dict(
            decay_mult=0.0,
        ),
    ),
)

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,
    ),
]

train_dataloader = dict(
    batch_size=1,
)

