-
Notifications
You must be signed in to change notification settings - Fork 2
/
pmg_v2_resnet50.yml
155 lines (146 loc) · 2.57 KB
/
pmg_v2_resnet50.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
EXP_NAME: "PMG_V2_ResNet50"
RESUME_WEIGHT: ~
WEIGHT:
NAME: "pmg_v2_resnet50.pth"
SAVE_DIR: "/mnt/sdb/data/wangxinran/model/fgvclib/"
LOGGER:
NAME: "txt_logger"
DATASET:
NAME: "CUB_200_2011"
ROOT: "/mnt/sdb/data/wangxinran/dataset/"
TRAIN:
BATCH_SIZE: 16
POSITIVE: 1
PIN_MEMORY: True
SHUFFLE: True
NUM_WORKERS: 4
TEST:
BATCH_SIZE: 16
POSITIVE: 0
PIN_MEMORY: False
SHUFFLE: False
NUM_WORKERS: 4
MODEL:
NAME: "PMG_V2"
CLASS_NUM: 200
ARGS:
- outputs_num: 3
- BLOCKS:
- [8, 8, 0, 0]
- [4, 4, 4, 0]
- [2, 2, 2, 2]
- alpha:
- 0.01
- 0.05
- 0.1
CRITERIONS:
- name: "cross_entropy_loss"
args: []
w: ~
- name: "mean_square_error_loss"
args: []
w: ~
BACKBONE:
NAME: "resnet50_bc"
ARGS:
- pretrained: True
- del_keys: []
ENCODER:
NAME: "global_max_pooling"
NECKS:
NAME: "multi_scale_conv"
ARGS:
- scale_num: 3
- in_dim:
- 512
- 1024
- 2048
- hid_dim:
- 512
- 512
- 512
- out_dim:
- 1024
- 1024
- 1024
HEADS:
NAME: "classifier_2fc"
ARGS:
- in_dim:
- 1024
- 1024
- 1024
- hid_dim: 512
TRANSFORMS:
TRAIN:
- name: "resize"
size:
- 600
- 600
- name: "random_crop"
size: 448
padding: 8
- name: "random_horizontal_flip"
prob: 0.5
- name: "to_tensor"
- name: "normalize"
mean:
- 0.5
- 0.5
- 0.5
std:
- 0.5
- 0.5
- 0.5
TEST:
- name: "resize"
size:
- 600
- 600
- name: "center_crop"
size: 448
- name: "to_tensor"
- name: "normalize"
mean:
- 0.5
- 0.5
- 0.5
std:
- 0.5
- 0.5
- 0.5
OPTIMIZER:
NAME: "SGD"
ARGS:
- momentum: 0.9
- weight_decay: 0.0005
LR:
base: 0.0005
backbone: 0.0005
encoder: ~
necks: 0.005
heads: 0.005
ITERATION_NUM: ~
EPOCH_NUM: 10
START_EPOCH: 0
UPDATE_STRATEGY: "progressive_updating_consistency_constraint"
# Validation details
PER_ITERATION: ~
PER_EPOCH: ~
METRICS:
- name: "accuracy(topk=1)"
metric: "accuracy"
top_k: 1
threshold: ~
- name: "accuracy(topk=5)"
metric: "accuracy"
top_k: 5
threshold: ~
- name: "recall(threshold=0.5)"
metric: "recall"
top_k: ~
threshold: 0.5
- name: "precision(threshold=0.5)"
metric: "precision"
top_k: ~
threshold: 0.5