-
Notifications
You must be signed in to change notification settings - Fork 2
/
resnet50.yml
131 lines (121 loc) · 2.13 KB
/
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
EXP_NAME: "ResNet50"
RESUME_WEIGHT: ~
WEIGHT:
NAME: "resnet50.pth"
SAVE_DIR: "/mnt/sdb/data/wangxinran/weight/fgvclib/"
LOGGER:
NAME: "txt_logger"
DATASET:
NAME: "CUB_200_2011"
ROOT: "/mnt/sdb/data/wangxinran/dataset/"
TRAIN:
BATCH_SIZE: 64
POSITIVE: 0
PIN_MEMORY: True
SHUFFLE: True
NUM_WORKERS: 4
TEST:
BATCH_SIZE: 64
POSITIVE: 0
PIN_MEMORY: False
SHUFFLE: False
NUM_WORKERS: 4
MODEL:
NAME: "ResNet50"
CLASS_NUM: 200
CRITERIONS:
- name: "cross_entropy_loss"
args: []
w: 1.0
BACKBONE:
NAME: "resnet50"
ARGS:
- pretrained: True
- del_keys: []
ENCODER:
NAME: "global_avg_pooling"
NECKS:
NAME: ~
HEADS:
NAME: "classifier_1fc"
ARGS:
- in_dim:
- 2048
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.0002
backbone: 0.0002
encoder: 0.002
necks: 0.002
heads: 0.002
ITERATION_NUM: ~
EPOCH_NUM: 50
START_EPOCH: 0
UPDATE_STRATEGY: "general_strategy"
# 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
INTERPRETER:
NAME: "cam"
METHOD: "gradcam"
TARGET_LAYERS:
- "backbone.layer4"