-
Notifications
You must be signed in to change notification settings - Fork 13
/
fpn_moganet_large_80k_ade20k.py
32 lines (30 loc) · 1.16 KB
/
fpn_moganet_large_80k_ade20k.py
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
30
31
32
_base_ = [
'../../_base_/models/fpn_moganet.py',
'../../_base_/datasets/ade20k.py',
'../../_base_/default_runtime.py'
]
# model settings
model = dict(
type='EncoderDecoder',
backbone=dict(
type='MogaNet_feat',
arch='large',
drop_path_rate=0.3,
init_cfg=dict(
type='Pretrained',
checkpoint=\
'https://github.com/Westlake-AI/MogaNet/releases/download/moganet-in1k-weights/moganet_large_sz224_8xbs64_ep300.pth.tar',
),
),
neck=dict(in_channels=[64, 160, 320, 640]),
decode_head=dict(num_classes=150))
gpu_multiples = 2 # we use 8 gpu instead of 4 in mmsegmentation, so lr*2 and max_iters/2
# optimizer
optimizer = dict(type='AdamW', lr=0.0001 * gpu_multiples, weight_decay=0.0001)
optimizer_config = dict()
# learning policy
lr_config = dict(policy='poly', power=0.9, min_lr=0.0, by_epoch=False)
# runtime settings
runner = dict(type='IterBasedRunner', max_iters=160000 // gpu_multiples)
checkpoint_config = dict(by_epoch=False, interval=8000 // gpu_multiples, max_keep_ckpts=1)
evaluation = dict(interval=8000 // gpu_multiples, metric='mIoU', save_best='auto')