-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf_pretrain.py
60 lines (51 loc) · 1.23 KB
/
conf_pretrain.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""
@author: Yanzuo Lu
@email: [email protected]
"""
from yacs.config import CfgNode as CN
# Config definition
_C = CN()
# MODEL
_C.MODEL = CN()
_C.MODEL.NAME = 'mae_vit_base_patch16'
_C.MODEL.MASK_RATIO = 0.75
_C.MODEL.NORM_PIX_LOSS = True
_C.MODEL.CHECKPOINT_PATH = ''
_C.MODEL.CHECKPOINT_POS_EMBED_SIZE = (16, 8)
_C.MODEL.PROJECTION_SIZE = 256
_C.MODEL.PROJECTION_HIDDEN_SIZE = 4096
_C.MODEL.MOVING_AVERAGE_DECAY = 0.99
_C.MODEL.CONTRASTIVE_LOSS_WEIGHT = 1.0
_C.MODEL.GENERATIVE_LOSS_WEIGHT = 1.0
_C.MODEL.DROP_PATH = 0.0
# INPUT
_C.INPUT = CN()
_C.INPUT.IMAGE_SIZE = (256, 128)
_C.INPUT.TRANSFORM = 'mae_aug'
_C.INPUT.MIN_SCALE = 0.2
_C.INPUT.MAX_SCALE = 1.0
# DATASET
_C.DATASET = CN()
_C.DATASET.NAME = 'LUPerson'
_C.DATASET.ROOT_DIR = 'data/LUPerson'
_C.DATASET.RANDOM_SAMPLE = True
_C.DATASET.RANDOM_SAMPLE_SIZE = 1281167
# DATALOADER
_C.DATALOADER = CN()
_C.DATALOADER.NUM_WORKERS = 16
# OPTIMIZER
_C.OPTIMIZER = CN()
_C.OPTIMIZER.BASE_LR = 1.5e-4
_C.OPTIMIZER.WEIGHT_DECAY = 0.05
_C.OPTIMIZER.BETAS = (0.9, 0.95)
# ENGINE
_C.ENGINE = CN()
_C.ENGINE.BATCH_SIZE = 512
_C.ENGINE.ACCUM_ITER = 4
_C.ENGINE.EPOCHS = 800
_C.ENGINE.WARMUP_EPOCHS = 40
# MISC
_C.OUTPUT_DIR = './runs'
_C.CHECKPOINT_OVERWRITE = True
_C.PRINT_FREQ = 10
_C.SEED = 0