miqa
xiaoqi-wang commited on
Commit
08a49f9
·
verified ·
1 Parent(s): d3d33cf

Upload models/model_configs/fcn_mae-base_pretrained_fp16_8x32_224x224_3600_imagenets919.py with huggingface_hub

Browse files
models/model_configs/fcn_mae-base_pretrained_fp16_8x32_224x224_3600_imagenets919.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '../_base_/models/fcn_r50-d8.py', '../_base_/datasets/imagenets.py',
3
+ '../_base_/default_runtime.py', '../_base_/schedules/schedule_20k.py'
4
+ ]
5
+
6
+ model = dict(
7
+ pretrained='./pretrain/mae_pretrain_vit_base_mmcls.pth',
8
+ backbone=dict(
9
+ _delete_=True,
10
+ type='VisionTransformer',
11
+ img_size=(224, 224),
12
+ patch_size=16,
13
+ in_channels=3,
14
+ embed_dims=768,
15
+ num_layers=12,
16
+ num_heads=12,
17
+ mlp_ratio=4,
18
+ out_indices=(2, 5, 8, 11),
19
+ qkv_bias=True,
20
+ drop_rate=0.0,
21
+ attn_drop_rate=0.0,
22
+ drop_path_rate=0.1,
23
+ with_cls_token=True,
24
+ norm_cfg=dict(type='LN', eps=1e-6),
25
+ act_cfg=dict(type='GELU'),
26
+ norm_eval=False,
27
+ final_norm=True,
28
+ interpolate_mode='bicubic'),
29
+ decode_head=dict(
30
+ in_channels=768,
31
+ channels=768,
32
+ num_convs=0,
33
+ dropout_ratio=0.0,
34
+ num_classes=920,
35
+ ignore_index=1000,
36
+ downsample_label_ratio=8,
37
+ init_cfg=dict(
38
+ type='TruncNormal', std=2e-5, override=dict(name='conv_seg'))),
39
+ auxiliary_head=None)
40
+
41
+ optimizer = dict(
42
+ _delete_=True,
43
+ constructor='LearningRateDecayOptimizerConstructor',
44
+ type='AdamW',
45
+ lr=5e-4,
46
+ betas=(0.9, 0.999),
47
+ weight_decay=0.05,
48
+ paramwise_cfg=dict(
49
+ num_layers=12, decay_rate=0.60, decay_type='layer_wise'))
50
+
51
+ lr_config = dict(
52
+ _delete_=True,
53
+ policy='CosineAnnealing',
54
+ warmup='linear',
55
+ warmup_iters=180,
56
+ warmup_ratio=1e-6,
57
+ min_lr=1e-6,
58
+ by_epoch=False)
59
+
60
+ # mixed precision
61
+ fp16 = dict(loss_scale='dynamic')
62
+
63
+ # By default, models are trained on 8 GPUs with 32 images per GPU
64
+ data = dict(samples_per_gpu=32)
65
+
66
+ # runtime settings
67
+ runner = dict(type='IterBasedRunner', max_iters=3600)
68
+ checkpoint_config = dict(by_epoch=False, interval=3600)
69
+ evaluation = dict(interval=360, metric='mIoU', pre_eval=True)