forked from PaddlePaddle/PaddleVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slowfast_multigrid.yaml
152 lines (143 loc) · 3.5 KB
/
slowfast_multigrid.yaml
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
MODEL: #MODEL field
framework: "Recognizer3D"
backbone:
name: "ResNetSlowFast"
depth: 50 # Not Optional, only 50 now.
alpha: 4
beta: 8
width_per_group: 64
fusion_kernel_sz: 7
bn_norm_type: "batchnorm"
head:
name: "SlowFastHead"
width_per_group: 64
alpha: 4
beta: 8
num_classes: 400
num_frames: 32
crop_size: 224 #independent to test or train mode
dropout_rate: 0.5
multigrid_short: True
DATASET: #DATASET field
batch_size: 8 #single bacth size
num_workers: 4
train:
format: "SFVideoDataset"
file_path: "./data/k400/train.list" #Mandatory, train data index file path
valid:
format: "SFVideoDataset"
file_path: "./data/k400/val.list" #Mandatory, valid data index file path
test:
format: "SFVideoDataset"
file_path: "../data/k400/val.list" #Mandatory, test data index file path
test_mode: True
num_ensemble_views: 10
num_spatial_crops: 3
PIPELINE:
train:
decode_sampler:
name: "DecodeSampler"
num_frames: 32
sampling_rate: 2
transform: #Mandotary, image transfrom operator
- JitterScale:
min_size: 256
max_size: 320
- MultiCrop:
target_size: 224
- RandomFlip:
- Image2Array:
transpose: False
- Normalization:
mean: [0.45, 0.45, 0.45]
std: [0.225, 0.225, 0.225]
tensor_shape: [1, 1, 1, 3]
- PackOutput:
alpha: 4
valid:
decode_sampler:
name: "DecodeSampler"
num_frames: 32
sampling_rate: 2
transform: #Mandotary, image transfrom operator
- JitterScale:
min_size: 256
max_size: 320
- MultiCrop:
target_size: 224
- RandomFlip:
- Image2Array:
transpose: False
- Normalization:
mean: [0.45, 0.45, 0.45]
std: [0.225, 0.225, 0.225]
tensor_shape: [1, 1, 1, 3]
- PackOutput:
alpha: 4
test:
decode_sampler:
name: "DecodeSampler"
num_frames: 32
sampling_rate: 2
test_mode: True
transform: #Mandotary, image transfrom operator
- JitterScale:
min_size: 224
max_size: 224
- MultiCrop:
target_size: 224
test_mode: True
- Image2Array:
transpose: False
- Normalization:
mean: [0.45, 0.45, 0.45]
std: [0.225, 0.225, 0.225]
tensor_shape: [1, 1, 1, 3]
- PackOutput:
alpha: 4
OPTIMIZER: #OPTIMIZER field
name: 'Momentum'
momentum: 0.9
learning_rate:
iter_step: True
name: 'CustomWarmupPiecewiseDecay'
warmup_epochs: 34
warmup_start_lr: 0.01
step_base_lr: 0.1
lrs: [1, 0.1, 0.01, 0.001, 0.0001, 0.00001]
gamma: 0.1
steps: [0, 94, 154, 196]
max_epoch: 239
weight_decay:
name: 'L2'
value: 1e-4
use_nesterov: True
METRIC:
name: 'MultiCropMetric'
num_ensemble_views: 10
num_spatial_crops: 3
num_classes: 400
MULTIGRID:
LONG_CYCLE: True
SHORT_CYCLE: True
default_batch_size: 0
default_temporal_size: 0
default_crop_size: 0
epoch_factor: 1.5 #1.0
bn_base_size: 8
long_cycle_sampling_rate: 0
long_cycle_factors:
- value: [0.25, 0.7071] # 0.5 ** 0.5
- value: [0.5, 0.7071]
- value: [0.5, 1]
- value: [1, 1]
short_cycle_factors: [0.5, 0.7071]
EVAL_FREQ: 3
PRECISEBN:
preciseBN_interval: 20
num_iters_preciseBN: 200 #default
model_name: SlowFast
val_interval: 20
log_interval: 20
epochs: 239 #Mandatory, total epoch
log_level: "INFO"