-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfg.yaml
198 lines (180 loc) · 5.22 KB
/
cfg.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#-m -p hydra.sweeper
defaults:
- hydra/job_logging: disabled
- hydra/output_subdir: null
# - hydra/sweeper: ax
main:
experiment_name_prefix: "VQA"
seed: 1
num_workers: 8
parallel: False
gpus_to_use: 1,2
trains: False
paths:
train_loader: './data/train_loader.pkl' # '/home/student/hw2/data/train_loader.pkl'
val_loader: './data/val_loader.pkl' # '/home/student/hw2/data/val_loader.pkl'
train_dataset: './data/train_dataset.pth' # '/home/student/hw2/data/train_dataset.pth'
val_dataset: './data/val_dataset.pth' # '/home/student/hw2/data/val_dataset.pth'
logs: 'logs/'
model_names:
q_model_name: 'attention_lstm' #'lstm' #
v_model_name: 'attention_cnn' #'cnn' #
vqa_model_name: 'atten_lstm_cnn' #'basic_lstm_cnn' #
train:
num_epochs: 15
grad_clip: 0.25
# dropout: 0.3
# num_hid: 20
batch_size: 64 # 16 # 10
save_model: False
lr:
lr_value: 1e-3
lr_decay: 15
lr_gamma: 0.1
lr_step_size: 3.0 # 0.5 #3.0 # 30.0
main_utils:
qa_path: 'datashare'
task: 'OpenEnded'
dataset: 'mscoco'
vision_utils:
train_file_path : "./data/cache/train_img_features.h5" # "/home/student/hw2/data/cache/train_img_features.h5"
val_file_path : "./data/cache/val_img_features.h5" # "/home/student/hw2/data/cache/val_img_features.h5"
num_train_imgs : 82783
num_val_imgs : 40504
dataset:
max_q_length: 30 # question_length = min(max_q_length, max_length_in_dataset)
resize_h: 224 #365 #640
resize_w: 224 #365 #640
resize_int: -1 #365 # 320/ 0.875
filter_ans_threshold: 9
q_model:
lstm:
vocab_size: 13278
emb_dim: 100
hidden_dim: 512 # 2*2*512
num_layer: 1
num_hid: 1024 # not used
output_dim: 1024
activation: 'ReLU'
dropout: 0.3
is_atten: False
attention_lstm:
vocab_size: 13278
emb_dim: 100 # 512
hidden_dim: 512 # 2*2*512
num_layer: 1
num_hid: 1000 # not used
output_dim: -1 #not used
activation: 'ReLU'
dropout: 0.3
is_atten: True
v_model:
cnn:
dims: [3, 32, 64, 128] # [3, 32, 64]
kernel_size: 3 # 5
padding: 1 # 2
pool: 2
fc_out: 1024
activation: 'ReLU'
is_atten: False
is_autoencoder: False
attention_cnn:
dims: [3, 32, 32, 64, 64, 128, 128, 256, 256] # [3, 32, 64, 128, 256] # # [3, 16, 32, 64, 128 ,256, 512, 1024] #
kernel_size: 3 #5
padding: 1 #2
pool: 2
fc_out: -1 # should be equal to fc_in that is calculated in the model init
activation: 'ReLU'
is_atten: True
is_autoencoder: False
atten_model:
projected_dim: 500
vqa_model:
basic_lstm_cnn:
activation: 'ReLU'
num_hid: 2048
dropout: 0.3
is_concat: True
atten_lstm_cnn:
activation: 'ReLU'
num_hid: 2048
dropout: 0.3
is_concat: False # True
#hydra:
# output_subdir: null
# run:
# dir: logs/hydra
# sweeper:
# # The following part of config is used to setup the Hydra Ax plugin and is optional
# ax_config:
# # max_trials is application-specific. Tune it for your use case
# max_trials: 20
#
# experiment:
# # Default to minimize, set to false to maximize
# minimize: False
#
# early_stop:
# # Number of epochs without a significant improvement from
# # the currently known best parameters
# # An Epoch is defined as a batch of trials executed in parallel
# max_epochs_without_improvement: 20
#
# params:
# train.lr.lr_step_size:
# type: choice
# values: [3.0, 30.0, 0.5]
# value_type: float
# q_model.lstm.emb_dim:
# type: choice
# values: [100, 300]
# value_type: int
# q_model.lstm.num_layer:
# type: choice
# values: [1, 2]
# value_type: int
# q_model.attention_lstm.emb_dim:
# type: choice
# values: [ 100, 300 ]
# value_type: int
# q_model.attention_lstm.num_layer:
# type: choice
# values: [ 1, 2 ]
# value_type: int
# v_model.cnn.dims:
# type: choice
# values: [
# '[3, 16, 32, 64]',
# '[3, 64, 128, 256]',
# '[3, 16, 64]',
# '[3, 16, 64, 128, 256, 512]',
# ]
# value_type: str
# v_model.attention_cnn.dims:
# type: choice
# values: ['[3, 16, 32, 64]',
# '[3, 64, 128, 256]',
# '[3, 16, 64]',
# '[3, 16, 64, 128, 256, 512]',
# ]
# value_type: str
# v_model.cnn.kernel_size:
# type: choice
# values: [3, 5]
# value_type: int
# v_model.attention_cnn.kernel_size:
# type: choice
# values: [3, 5]
# value_type: int
# atten_model.projected_dim:
# type: choice
# values: [200, 1024]
# value_type: int
# vqa_model.basic_lstm_cnn.is_concat:
# type: choice
# values: [ False, True ]
# value_type: bool
# vqa_model.atten_lstm_cnn.is_concat:
# type: choice
# values: [ False, True ]
# value_type: bool