-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_test_msrvtt.yml
155 lines (143 loc) · 4.75 KB
/
config_test_msrvtt.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
LOGGER_NAME: 'log'
SEED: 1.0
#SEED: 1546884941.160048
############################ TRAIN ############################
TRAIN:
BATCH_SIZE: 5
#################### SCHEDULED_SAMPLING ####################
SCHEDULED_SAMPLING:
START: 6
INC_EVERY: 5
INC_PROB: 0.05
MAX_PROB: 0.5
#################### REINFORCEMENT ####################
REINFORCEMENT:
START: 9999
############################ TEST ############################
TEST:
BATCH_SIZE: 20
############################ DATA_LOADER ############################
DATA_LOADER:
NUM_WORKERS: 4
SHUFFLE: True
TRAIN_S3D_FEATS: '/data/MSRVTT/MSRVTT-S3D-final'
TRAIN_S3D_LOGITS: '/data/MSRVTT/MSRVTT-S3D-logits-final'
TRAIN_RES152_FEATS: '/data/MSRVTT/MSRVTT-Res152-final'
TRAIN_RES152_LOGITS: '/data/MSRVTT/MSRVTT-Res152-logits-final'
VAL_S3D_FEATS: '/data/MSRVTT/MSRVTT-S3D-final'
VAL_RES152_FEATS: '/data/MSRVTT/MSRVTT-Res152-final'
VAL_S3D_LOGITS: '/data/MSRVTT/MSRVTT-S3D-logits-final'
VAL_RES152_LOGITS: '/data/MSRVTT/MSRVTT-Res152-logits-final'
TEST_S3D_FEATS: '/data/MSRVTT/MSRVTT-S3D-final'
TEST_RES152_FEATS: '/data/MSRVTT/MSRVTT-Res152-final'
TEST_S3D_LOGITS: '/data/MSRVTT/MSRVTT-S3D-logits-final'
TEST_RES152_LOGITS: '/data/MSRVTT/MSRVTT-Res152-logits-final'
TRAIN_ID: './data_msrvtt/train_ids.txt'
VAL_ID: './data_msrvtt/val_ids.txt'
INPUT_SEQ_PATH: './data_common/msrvtt_train_input.pkl'
SEQ_PER_IMG: 20
MAX_FEAT: -1
############################ MODEL ############################
MODEL:
TYPE: 'XLANV'
SEQ_LEN: 20 # include <EOS>/<BOS>
VOCAB_SIZE: 30521 # exclude <EOS>/<BOS>
########## word embedding ##########
WORD_EMBED_DIM: 1024
WORD_EMBED_ACT: 'CELU'
WORD_EMBED_NORM: False
DROPOUT_WORD_EMBED: 0.5
########## global features ##########
S3D_FEATS_DIM: 1024
S3D_FEATS_EMBED_DIM: 1024
S3D_FEATS_EMBED_ACT: 'CELU'
DROPOUT_S3D_EMBED: 0.5
S3D_FEATS_NORM: False
########## attention features ##########
RES152_FEATS_DIM: 2048
RES152_FEATS_EMBED_DIM: 1024
RES152_FEATS_EMBED_ACT: 'CELU'
DROPOUT_RES152_EMBED: 0.5
RES152_FEATS_NORM: False
########## attention param ##########
ATT_HIDDEN_SIZE: -1
ATT_HIDDEN_DROP: 0.0
ATT_ACT: 'TANH'
########## rnn param ##########
RNN_SIZE: 1024
DROPOUT_LM: 0.5
########## BOTTOM_UP ##########
BOTTOM_UP:
DROPOUT_FIRST_INPUT: 0.0
DROPOUT_SEC_INPUT: 0.0
########## BILINEAR ##########
BILINEAR:
DIM: 1024
ENCODE_RES152_MID_DIM: [128, 64, 128]
DECODE_RES152_MID_DIM: [128, 64, 128]
ENCODE_RES152_MID_DROPOUT: 0.1
DECODE_RES152_MID_DROPOUT: 0.1
ATT_DIM: 1024
ACT: 'CELU'
ENCODE_DROPOUT: 0.5
DECODE_DROPOUT: 0.5
ENCODE_LAYERS: 4
DECODE_LAYERS: 1
TYPE: 'LowRank'
ATTTYPE: 'SCAtt' # SCAtt, BasicAtt
HEAD: 8
ENCODE_BLOCK: 'LowRankBilinearEnc'
DECODE_BLOCK: 'LowRankBilinearDec'
ELU_ALPHA: 1.3
ENCODE_BIFEAT_EMB_DROPOUT: 0.3
IF_POS: False
############################ SOLVER ############################
SOLVER:
BASE_LR: 0.0005
TYPE: 'ADAM' # 'ADAM', 'SGD', 'ADAGRAD', 'RMSPROP'
MAX_EPOCH: 70
MAX_ITER: -1
GRAD_CLIP: 0.5 # Norm:5 , Clamp:0.1
GRAD_CLIP_TYPE: 'Norm' # 'Clamp', 'Norm'
WEIGHT_DECAY: 0.0000
WEIGHT_DECAY_BIAS: 0.0
BIAS_LR_FACTOR: 1
DISPLAY: 10
TEST_INTERVAL: 1
SNAPSHOT_ITERS: 1
########## SGD ##########
SGD:
MOMENTUM: 0.9
########## ADAM ##########
ADAM:
BETAS: [0.9, 0.98]
EPS: 1.0e-9
########## LR_POLICY ##########
LR_POLICY:
TYPE: 'Noam' # 'Fix', 'Step', 'Noam', 'Plateau'
GAMMA: 0.8
STEP_SIZE: 3
SETP_TYPE: 'Iter' # 'Epoch', 'Iter'
WARMUP: 10000 # For Noam only
FACTOR: 1.0 # For Noam only
MODEL_SIZE: 1024 # For Noam only
############################ LOSSES ############################
LOSSES:
XE_TYPE: 'CrossEntropy' # 'CrossEntropy', 'LabelSmoothing'
LABELSMOOTHING: 0.1
RL_TYPE: 'RewardCriterion'
############################ SCORER ############################
SCORER:
TYPES: ['CIDEr']
WEIGHTS: [1.0]
GT_PATH: './data_common/msrvtt_train_gts_bert.pkl'
CIDER_CACHED: './data_common/msrvtt_train_cider_bert.pkl'
############################ INFERENCE ############################
INFERENCE:
VOCAB: './data_msrvtt/msrvtt_vocab.txt'
ID_KEY: 'image_id'
CAP_KEY: 'caption'
EVAL: 'COCO'
VAL_ANNFILE: './data_msrvtt/msrvtt_val500.json'
BEAM_SIZE: 4
GREEDY_DECODE: True