-
Notifications
You must be signed in to change notification settings - Fork 197
/
autotest.sh
executable file
·28 lines (26 loc) · 1.71 KB
/
autotest.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
rm -rf ./autotest/models/
if [ -n "$2" ]; then
gpu_device=$2
else
gpu_device=-1
fi
if [ "$1"x = "Y"x ]; then
for path in '--conf_path=autotest/conf/conf_text_classification_bilstm_attn_autotest.json --force=True' '--conf_path=autotest/conf/conf_chinese_text_matching_char_autotest.json --force=True' '--conf_path=autotest/conf/conf_question_pairs_bilstm_attn_autotest.json --force=True' '--conf_path=autotest/conf/conf_kdtm_match_linearAttn_autotest.json --force=True'
do
(
CUDA_VISIBLE_DEVICES=$gpu_device python train.py $path
CUDA_VISIBLE_DEVICES=-1 python test.py $path
)&
done
wait
else
CUDA_VISIBLE_DEVICES=$gpu_device python train.py --conf_path=autotest/conf/conf_text_classification_bilstm_attn_autotest.json --force=True
CUDA_VISIBLE_DEVICES=-1 python test.py --conf_path=autotest/conf/conf_text_classification_bilstm_attn_autotest.json --force=True
CUDA_VISIBLE_DEVICES=$gpu_device python train.py --conf_path=autotest/conf/conf_chinese_text_matching_char_autotest.json --force=True
CUDA_VISIBLE_DEVICES=-1 python test.py --conf_path=autotest/conf/conf_chinese_text_matching_char_autotest.json --force=True
CUDA_VISIBLE_DEVICES=$gpu_device python train.py --conf_path=autotest/conf/conf_question_pairs_bilstm_attn_autotest.json --force=True
CUDA_VISIBLE_DEVICES=-1 python test.py --conf_path=autotest/conf/conf_question_pairs_bilstm_attn_autotest.json --force=True
CUDA_VISIBLE_DEVICES=$gpu_device python train.py --conf_path=autotest/conf/conf_kdtm_match_linearAttn_autotest.json --force=True
CUDA_VISIBLE_DEVICES=-1 python test.py --conf_path=autotest/conf/conf_kdtm_match_linearAttn_autotest.json --force=True
fi
python ./autotest/tools/get_results.py