-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase_episode.yml
executable file
·131 lines (121 loc) · 2.97 KB
/
base_episode.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
# timezone, it will use to get run_id
timezone: Asia/Ho_Chi_Minh
# training type
type: episode
model:
name: baseline
# backbone support: [osnet, resnet50, resnet101, resnet50_nl, resnet101_nl, resnet50_ibn_a, resnet101_ibn_a, resnet50_ibn_a_nl, resnet101_ibn_a_nl]
# nl: https://arxiv.org/abs/1711.07971
# ibn_a: https://github.com/XingangPan/IBN-Net
backbone: resnet50
pretrained: True
# global pooling support: [avg_pooling, gem_pooling]
pooling: gem_pooling
pooling_size: 1
# head support: [BNHead, ReductionHead]
head: BNHead
# bn_where before or after of liner layer
bn_where: after
# set bias of batch norm in head layer
batch_norm_bias: True
# using tqdm process bar when download pretrained model
use_tqdm: False
data:
# folder will save data
data_dir: "/home/coder/project/datasets/"
# name of dataset: [peta, pa100k, ppe, ppe_two, wider]
name: peta
image_size: [256, 192]
num_workers: 4
pin_memory: True
sampler: RandomBalanceBatchSamplerAttribute
train:
num_attribute: 8
num_sampler: 16
num_positive: 8
num_negative: 8
num_iterator: 700
val:
num_attribute: 8
num_sampler: 16
num_positive: 8
num_negative: 8
num_iterator: 100
# optimizer support: [adam, sgd]
optimizer:
name: adam
lr: 0.00035
specified_lr:
enable: False
lr: 0.1
layers: [head]
default:
adam:
weight_decay: 0.0005
beta1: 0.9
beta2: 0.99
sgd:
momentum: 0.9
weight_decay: 0.0005
dampening: 0
nesterov: False
# loss support: [Singular_BCE]
loss:
name: Singular_BCE
default:
Singular_BCE:
reduction: mean
alpha: 1
gamma: 2.5
epsilon: 0.1
# freeze <layers> at first <epochs>.
freeze:
enable: False
layers: [backbone]
epochs: 10
# learning rate scheduler. if you not config manual parameters, it will get from default, corresponding name
lr_scheduler:
enable: True
name: WarmupMultiStepLR
start: 1
default:
WarmupMultiStepLR:
steps: [40, 60, 90]
gamma: 0.1
warmup_factor: 0.01
warmup_iters: 10
warmup_method: linear
ReduceLROnPlateau:
factor: 0.1
patience: 10
min_lr: 0.0000001
MultiStepLR:
steps: [40, 70]
gamma: 0.1
WarmupCosineAnnealingLR:
max_iters: 120
delay_iters: 30
eta_min_lr: 0.00000077
warmup_factor: 0.01
warmup_iters: 10
warmup_method: linear
CosineAnnealingLR:
max_iters: 120
eta_min_lr: 0.00000077
# Gradient accumulation
iters_to_accumulate: 1
# clipping gradient
clip_grad_norm_:
enable: False
max_norm: 10.0
# use_tqdm: use tqdm process bar when training.
trainer:
# 0 if using cpu. > 0 if using gpu
n_gpu: 0
# maximum epoch
epochs: 120
# saved log folder
checkpoint_dir: saved/checkpoints
log_dir: saved/logs
output_dir: saved/outputs
use_tqdm: True