Commit 5cf7717c by xuchen

modify the egs scripts

parent a3c033d9
...@@ -74,7 +74,10 @@ fi ...@@ -74,7 +74,10 @@ fi
# full path # full path
train_config=$pwd_dir/conf/${train_config} train_config=$pwd_dir/conf/${train_config}
if [[ -z ${exp_name} ]]; then if [[ -z ${exp_name} ]]; then
exp_name=$(basename ${train_config%.*})_${exp_tag}${extra_tag} exp_name=$(basename ${train_config%.*})_${exp_tag}
if [[ -n ${extra_tag} ]]; then
exp_name=${exp_name}_${extra_tag}
fi
fi fi
model_dir=$root_dir/../checkpoints/$dataset/$task/asr/${exp_name} model_dir=$root_dir/../checkpoints/$dataset/$task/asr/${exp_name}
......
...@@ -30,7 +30,7 @@ if [[ -n ${extra_tag} ]]; then ...@@ -30,7 +30,7 @@ if [[ -n ${extra_tag} ]]; then
cmd="$cmd --extra_tag ${extra_tag}" cmd="$cmd --extra_tag ${extra_tag}"
fi fi
if [[ -n ${extra_parameter} ]]; then if [[ -n ${extra_parameter} ]]; then
cmd="$cmd --extra_parameter ${extra_parameter}" cmd="$cmd --extra_parameter \"${extra_parameter}\""
fi fi
echo $cmd echo $cmd
......
...@@ -75,7 +75,10 @@ fi ...@@ -75,7 +75,10 @@ fi
# full path # full path
train_config=$pwd_dir/conf/${train_config} train_config=$pwd_dir/conf/${train_config}
if [[ -z ${exp_name} ]]; then if [[ -z ${exp_name} ]]; then
exp_name=$(basename ${train_config%.*})_${exp_tag}${extra_tag} exp_name=$(basename ${train_config%.*})_${exp_tag}
if [[ -n ${extra_tag} ]]; then
exp_name=${exp_name}_${extra_tag}
fi
fi fi
model_dir=$root_dir/../checkpoints/$dataset/$task/asr/${exp_name} model_dir=$root_dir/../checkpoints/$dataset/$task/asr/${exp_name}
......
...@@ -31,7 +31,7 @@ if [[ -n ${extra_tag} ]]; then ...@@ -31,7 +31,7 @@ if [[ -n ${extra_tag} ]]; then
cmd="$cmd --extra_tag ${extra_tag}" cmd="$cmd --extra_tag ${extra_tag}"
fi fi
if [[ -n ${extra_parameter} ]]; then if [[ -n ${extra_parameter} ]]; then
cmd="$cmd --extra_parameter ${extra_parameter}" cmd="$cmd --extra_parameter \"${extra_parameter}\""
fi fi
echo $cmd echo $cmd
......
...@@ -36,8 +36,8 @@ dataset=mustc ...@@ -36,8 +36,8 @@ dataset=mustc
task=speech_to_text task=speech_to_text
vocab_type=unigram vocab_type=unigram
asr_vocab_size=5000 asr_vocab_size=5000
vocab_size=8000 vocab_size=10000
share_dict=0 share_dict=1
data_dir=~/st/data/${dataset} data_dir=~/st/data/${dataset}
test_subset=(tst-COMMON) test_subset=(tst-COMMON)
...@@ -83,7 +83,10 @@ fi ...@@ -83,7 +83,10 @@ fi
# full path # full path
train_config=$pwd_dir/conf/${train_config} train_config=$pwd_dir/conf/${train_config}
if [[ -z ${exp_name} ]]; then if [[ -z ${exp_name} ]]; then
exp_name=$(basename ${train_config%.*})_${exp_tag}${extra_tag} exp_name=$(basename ${train_config%.*})_${exp_tag}
if [[ -n ${extra_tag} ]]; then
exp_name=${exp_name}_${extra_tag}
fi
fi fi
model_dir=$root_dir/../checkpoints/$dataset/$task/st/${exp_name} model_dir=$root_dir/../checkpoints/$dataset/$task/st/${exp_name}
...@@ -103,7 +106,7 @@ if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then ...@@ -103,7 +106,7 @@ if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
--vocab-type ${vocab_type} --vocab-type ${vocab_type}
--vocab-size ${asr_vocab_size}" --vocab-size ${asr_vocab_size}"
echo -e "\033[34mRun command: \n${cmd} \033[0m" echo -e "\033[34mRun command: \n${cmd} \033[0m"
#[[ $eval -eq 1 && ${share_dict} -ne 1 ]] && eval $cmd [[ $eval -eq 1 && ${share_dict} -ne 1 ]] && eval $cmd
echo "stage 0: ST Data Preparation" echo "stage 0: ST Data Preparation"
cmd="python ${root_dir}/examples/speech_to_text/prep_mustc_data.py cmd="python ${root_dir}/examples/speech_to_text/prep_mustc_data.py
......
...@@ -31,7 +31,7 @@ if [[ -n ${extra_tag} ]]; then ...@@ -31,7 +31,7 @@ if [[ -n ${extra_tag} ]]; then
cmd="$cmd --extra_tag ${extra_tag}" cmd="$cmd --extra_tag ${extra_tag}"
fi fi
if [[ -n ${extra_parameter} ]]; then if [[ -n ${extra_parameter} ]]; then
cmd="$cmd --extra_parameter ${extra_parameter}" cmd="$cmd --extra_parameter \"${extra_parameter}\""
fi fi
echo $cmd echo $cmd
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论