validation scripts

This commit is contained in:
Triplecq 2024-01-25 01:25:28 +09:00
parent f35fa8aa8f
commit d864da4d65
3 changed files with 26 additions and 8 deletions

View File

@ -1,5 +1,5 @@
num_epochs=30 num_epochs=30
for ((i=$num_epochs; i>=1; i--)); for ((i=$num_epochs; i>=15; i--));
do do
for ((j=1; j<=$i; j++)); for ((j=1; j<=$i; j++));
do do
@ -7,8 +7,9 @@ do
--epoch $i \ --epoch $i \
--avg $j \ --avg $j \
--exp-dir zipformer/exp \ --exp-dir zipformer/exp \
--max-duration 300 \ --max-duration 450 \
--lang data/lang_char \ --lang data/lang_char \
--decoding-method greedy_search --decoding-method greedy_search \
--blank-penalty 2
done done
done done

View File

@ -1,14 +1,15 @@
num_epochs=30 num_epochs=30
for ((i=$num_epochs; i>=1; i--)); for ((i=$num_epochs; i>=20; i--));
do do
for ((j=1; j<=$i; j++)); for avg in 12 11 10 9 8 7 6 5;
do do
python3 ./zipformer/decode.py \ python3 ./zipformer/decode.py \
--epoch $i \ --epoch $i \
--avg $j \ --avg $avg \
--exp-dir zipformer/exp \ --exp-dir zipformer/exp \
--max-duration 300 \ --max-duration 450 \
--lang data/lang_char \ --lang data/lang_char \
--decoding-method modified_beam_search --decoding-method modified_beam_search \
--blank-penalty 2.5
done done
done done

16
egs/reazonspeech/ASR/summary.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
summary_file="summary_results.txt"
> "$summary_file"
for file in wer-summary-valid-*-epoch-*-avg-*.txt; do
# Extract epoch and avg values from the filename
epoch=$(echo "$file" | grep -oP 'epoch-\K[0-9]+')
avg=$(echo "$file" | grep -oP 'avg-\K[0-9]+')
# Extract the WER value from the second line of the file
wer=$(awk 'NR==2 {print $2}' "$file")
# Append the results to the summary file
echo "epoch $epoch avg $avg greedy_search $wer" >> "$summary_file"
done