Blame view
egs/cifar/v1/local/nnet3/compare.sh
1.15 KB
8dcb6dfcb first commit |
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 51 52 53 54 55 56 |
#!/bin/bash # this script is used for comparing trained models between systems. # e.g. local/nnet3/compare.sh exp/resnet1{b,c}_cifar10 if [ $# == 0 ]; then echo "Usage: $0: <dir1> [<dir2> ... ]" echo "e.g.: $0 exp/resnet1{b,c}_cifar10" exit 1 fi echo "# $0 $*" echo -n "# System " for x in $*; do printf "% 12s" " $(basename $x)"; done echo echo -n "# final test accuracy: " for x in $*; do acc=$(grep acc $x/log/compute_prob_valid.final.log | awk '{print $8}') printf "% 12s" $acc done echo echo -n "# final train accuracy: " for x in $*; do acc=$(grep acc $x/log/compute_prob_train.final.log | awk '{print $8}') printf "% 12s" $acc done echo echo -n "# final test objf: " for x in $*; do objf=$(grep log-like $x/log/compute_prob_valid.final.log | awk '{print $8}') printf "% 12s" $objf done echo echo -n "# final train objf: " for x in $*; do objf=$(grep log-like $x/log/compute_prob_train.final.log | awk '{print $8}') printf "% 12s" $objf done echo echo -n "# num-parameters: " for x in $*; do params=$(grep num-parameters $x/log/progress.1.log | awk '{print $2}') printf "% 12s" $params done echo |