-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathrun_main.sh
46 lines (41 loc) · 1.51 KB
/
run_main.sh
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
#!/usr/bin/env bash
release_path=tvqa_plus_stage_features
#release_path=$1
debug_vcpt_path=${release_path}/bottom_up_visual_sen_hq_bbt_100_debug.pickle
vcpt_path=${release_path}/tvqa_bbt_frcn_vg_hq_20_100.json
#vfeat_path=${release_path}/tvqa_bbt_frcn_vg_hq_20_100_pca.h5
vfeat_path=${release_path}/tvqa_bbt_bottom_up_pool5_hq_20_100_pca.h5
train_path=${release_path}/tvqa_plus_train_preprocessed.json
valid_path=${release_path}/tvqa_plus_valid_preprocessed.json
test_path=${release_path}/tvqa_plus_test_preprocessed_no_anno.json
qa_bert_path=${release_path}/bbt_qa_s_tokenized_bert_sub_qa_tuned_new_qid.h5
sub_bert_path=${release_path}/bbt_sub_s_tokenized_bert_sub_qa_tuned.h5
sub_path=${release_path}/tvqa_plus_subtitles.json
word2idx_path=${release_path}/word2idx.json
eval_object_vocab_path=${release_path}/eval_object_vocab.json
frm_cnt_path=${release_path}/frm_cnt_cache.json
extra_args=()
if [[ $1 == "debug" ]]; then
echo "debug mode"
extra_args+=(--vcpt_path)
extra_args+=(${debug_vcpt_path})
extra_args+=(--debug)
extra_args+=(${@:2})
else
extra_args+=(--vcpt_path)
extra_args+=(${vcpt_path})
extra_args+=(${@:1})
fi
python main.py \
--train_path ${train_path} \
--valid_path ${valid_path} \
--sub_path ${sub_path} \
--qa_bert_path ${qa_bert_path} \
--sub_bert_path ${sub_bert_path} \
--vcpt_path ${vcpt_path} \
--vfeat_path ${vfeat_path} \
--word2idx_path ${word2idx_path} \
--eval_object_vocab_path ${eval_object_vocab_path} \
--frm_cnt_path ${frm_cnt_path} \
--use_sup_att \
${extra_args[@]}