compare_wer_general.sh
1.26 KB
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
43
44
45
46
47
48
49
50
#!/bin/bash
# Prints a table makes it easy to compare WER and objective values across nnet3
# and chain training runs
echo -n "System "
for x in "$@"; do printf "% 10s" $x; done
echo
echo -n "WER on dev(tg) "
for x in "$@"; do
wer=$(grep WER ${x}/decode_dev/wer_* | utils/best_wer.sh | awk '{print $2}')
printf "% 10s" $wer
done
echo
echo -n "WER on test(tg) "
for x in "$@"; do
wer=$(grep WER ${x}/decode_test/wer_* | utils/best_wer.sh | awk '{print $2}')
printf "% 10s" $wer
done
echo
echo -n "Final train prob "
for x in "$@"; do
prob=$(grep Overall ${x}/log/compute_prob_train.final.log | grep -v xent | awk '{printf("%.4f", $8)}')
printf "% 10s" $prob
done
echo
echo -n "Final valid prob "
for x in "$@"; do
prob=$(grep Overall ${x}/log/compute_prob_valid.final.log | grep -v xent | awk '{printf("%.4f", $8)}')
printf "% 10s" $prob
done
echo
echo -n "Final train prob (xent) "
for x in "$@"; do
prob=$(grep Overall ${x}/log/compute_prob_train.final.log | grep -w xent | awk '{printf("%.4f", $8)}')
printf "% 10s" $prob
done
echo
echo -n "Final valid prob (xent) "
for x in "$@"; do
prob=$(grep Overall ${x}/log/compute_prob_valid.final.log | grep -w xent | awk '{printf("%.4f", $8)}')
printf "% 10s" $prob
done
echo