-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf_finetune.py
63 lines (53 loc) · 1.23 KB
/
conf_finetune.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
61
62
63
"""
@author: Yanzuo Lu
@email: [email protected]
"""
from yacs.config import CfgNode as CN
# Config definition
_C = CN()
# MODEL
_C.MODEL = CN()
_C.MODEL.NAME = 'vit_base_patch16'
_C.MODEL.DROP_PATH = 0.1
_C.MODEL.CHECKPOINT_PATH = ''
_C.MODEL.CHECKPOINT_POS_EMBED_SIZE = (16, 8)
_C.MODEL.DEVICE_ID = 0
_C.MODEL.ID_LOSS_WEIGHT = 0.5
_C.MODEL.TRI_LOSS_WEIGHT = 0.5
# INPUT
_C.INPUT = CN()
_C.INPUT.IMAGE_SIZE = (256, 128)
_C.INPUT.TRANSFORM = 'transreid_aug'
_C.INPUT.PADDING = 10
_C.INPUT.RE_PROB = 0.5
# DATASET
_C.DATASET = CN()
_C.DATASET.NAME = 'MSMT17'
_C.DATASET.ROOT_DIR = '/home/lyz/datasets/MSMT17_V2'
# DATALOADER
_C.DATALOADER = CN()
_C.DATALOADER.NUM_WORKERS = 8
_C.DATALOADER.NUM_INSTANCES = 8
# OPTIMIZER
_C.OPTIMIZER = CN()
_C.OPTIMIZER.LR = 8e-3
_C.OPTIMIZER.LAYER_DECAY = 0.4
_C.OPTIMIZER.WEIGHT_DECAY = 0.05
_C.OPTIMIZER.BETAS = (0.9, 0.999)
# ENGINE
_C.ENGINE = CN()
_C.ENGINE.BATCH_SIZE = 64
_C.ENGINE.EPOCHS = 100
_C.ENGINE.WARMUP_EPOCHS = 5
# VALIDATE
_C.VALIDATE = CN()
_C.VALIDATE.BATCH_SIZE = 256
_C.VALIDATE.EVAL_FREQ = 100
_C.VALIDATE.TRANSFORM = 'no_aug'
_C.VALIDATE.FEAT_NORM = True
_C.VALIDATE.BEFORE_TRAIN = False
# MISC
_C.OUTPUT_DIR = './runs'
_C.CHECKPOINT_OVERWRITE = True
_C.PRINT_FREQ = 10
_C.SEED = 0