-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmono_full_exp.sh
executable file
·42 lines (36 loc) · 1.02 KB
/
mono_full_exp.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
#!/usr/bin/env sh
MODEL_NAME=$1
CONFIG=$2
OVERWRITE=$3
DECODE_MODE=$4
EVAL_SUFFIX=$5
ACCENT=$6
DECODE_BATCH_SIZE=32
name=$(hostname)
if [[ $name == *.speech ]];then
if [[ $name == "login.speech" ]];then
echo "[ERR] CANNOT run on login.speech!!"
exit 1
fi
echo "Running on battleship ($name)"
else
echo "Running on $name"
fi
## train
cmd="python train.py --config $CONFIG --eval_suffix $EVAL_SUFFIX --accent $ACCENT --algo no --model_name $MODEL_NAME --njobs 4"
if [[ $OVERWRITE == "overwrite" ]];then
cmd="$cmd --overwrite"
fi
echo $cmd
eval $cmd
## decode
cmd="python train.py --config $CONFIG --eval_suffix $EVAL_SUFFIX --accent $ACCENT --algo no --model_name $MODEL_NAME --test --decode_mode $DECODE_MODE --njobs 4 --decode_batch_size $DECODE_BATCH_SIZE"
if [[ $OVERWRITE == "overwrite" ]];then
cmd="$cmd --overwrite"
fi
echo $cmd
eval $cmd
## score
cmd="./score.sh --config $CONFIG --eval_suffix $EVAL_SUFFIX --accent $ACCENT --algo $ALGO no --model_name $MODEL_NAME --decode_mode $DECODE_MODE"
echo $cmd
eval $cmd