-
Notifications
You must be signed in to change notification settings - Fork 87
/
config.py
executable file
·59 lines (43 loc) · 1.26 KB
/
config.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
"""
@Fire
https://github.com/fire717
"""
cfg = {
##### Global Setting
'GPU_ID': '0',
"num_workers":8,
"random_seed":42,
"cfg_verbose":True,
"save_dir": "output/",
"num_classes": 17,
"width_mult":1.0,
"img_size": 192,
##### Train Setting
'img_path':"./data/cropped/imgs",
'train_label_path':'./data/cropped/train2017.json',
'val_label_path':'./data/cropped/val2017.json',
'balance_data':False,
'log_interval':10,
'save_best_only': True,
'pin_memory': True,
##### Train Hyperparameters
'learning_rate':0.001,#1.25e-4
'batch_size':64,
'epochs':120,
'optimizer':'Adam', #Adam SGD
'scheduler':'MultiStepLR-70,100-0.1', #default SGDR-5-2 CVPR step-4-0.8 MultiStepLR
'weight_decay' : 5.e-4,#0.0001,
'class_weight': None,#[1., 1., 1., 1., 1., 1., 1., ]
'clip_gradient': 5,#1,
##### Test
'test_img_path':"./data/cropped/imgs",
#"../data/eval/imgs",
#"../data/eval/imgs",
#"../data/all/imgs"
#"../data/true/mypc/crop_upper1"
#../data/coco/small_dataset/imgs
#"../data/testimg"
'exam_label_path':'../data/all/data_all_new.json',
'eval_img_path':'../data/eval/imgs',
'eval_label_path':'../data/eval/mypc.json',
}