| | |
| | | tag=exp1 |
| | | model_dir="baseline_$(basename "${lm_config}" .yaml)_${lang}_${token_type}_${tag}" |
| | | lm_exp=${exp_dir}/exp/${model_dir} |
| | | inference_lm=valid.loss.ave.pth # Language model path for decoding. |
| | | inference_lm=valid.loss.ave.pb # Language model path for decoding. |
| | | |
| | | stage=0 |
| | | stop_stage=3 |
| | |
| | | if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then |
| | | echo "Stage 3: Calc perplexity: ${lm_test_text}" |
| | | |
| | | python ../../../funasr/bin/lm_inference.py \ |
| | | python ../../../funasr/bin/lm_inference_launch.py \ |
| | | --output_dir "${lm_exp}/perplexity_test" \ |
| | | --ngpu "${gpu_num}" \ |
| | | --batch_size 1 \ |