-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.py
33 lines (29 loc) · 1.36 KB
/
config.py
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
# paths
q_path = 'data/questions' # directory of questions
a_path = 'data/annotations' # directory of annotations
train_path = 'data/images/train' # directory of training images
val_path = 'data/images/val' # directory of validation images
test_path = 'data/images/test' # directory of test images
preprocessed_path = './resnet-14x14.h5' # path where preprocessed features are saved to and loaded from
preprocessed_path_test = './resnet-14x14-test.h5' # test set preprocessed features
vocabulary_path = 'vocab.json' # path where the used vocabularies for question and answers are saved to
task = 'OpenEnded'
dataset = 'mscoco'
# preprocess config
preprocess_batch_size = 4
image_size = 448 # scale shorter end of image to this size and centre crop
output_size = image_size // 32 # size of the feature maps after processing through a network
output_features = 2048 # number of feature maps thereof
central_fraction = 0.875 # only take this much of the centre when scaling and centre cropping
# training config
pretrained = False # set to true to continue training with a checkpoint or a pretrained model
pretrained_model_path = 'logs/2021-07-10_13:44:34.pth' # your pretrained model path
epochs = 30
batch_size = 64
initial_lr = 2e-3 # default Adam lr
lr_halflife = 50000 # in iterations
data_workers = 1
max_answers = 350
# context seleciton
device = 'GPU'
# device = 'Ascend'