[examples] use ds_tcn as default model (#34)

* [examples] use ds_tcn as default model

* fix scoring gpu id
This commit is contained in:
Binbin Zhang 2021-12-07 10:36:38 +08:00 committed by GitHub
parent 93bf93565e
commit 92a4c19ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View File

@ -4,9 +4,7 @@ FRRs with FAR fixed at once per hour:
|------------------|-----------|-----------|------------|--------------| |------------------|-----------|-----------|------------|--------------|
| GRU | 203 | 80(avg30) | 0.088901 | 0.083827 | | GRU | 203 | 80(avg30) | 0.088901 | 0.083827 |
| TCN | 134 | 80(avg30) | 0.023494 | 0.029884 | | TCN | 134 | 80(avg30) | 0.023494 | 0.029884 |
| DS_TCN | 21 | 60 | 0.011559 | 0.014190 | | DS_TCN | 21 | 80(avg30) | 0.019641 | 0.018325 |
| DS_TCN | 21 | 80 | 0.010807 | 0.014754 | | DS_TCN(spec_aug) | 21 | 80(avg30) | 0.029509 | 0.008928 |
| DS_TCN | 21 | 80(avg30) | 0.009867 | 0.014472 |
| DS_TCN(spec_aug) | 21 | 80(avg30) | 0.029039 | 0.022648 |
| MDTC | 156 | 80(avg10) | 0.007142 | 0.005920 | | MDTC | 156 | 80(avg10) | 0.007142 | 0.005920 |
| MDTC_Small | 31 | 80(avg10) | 0.005357 | 0.005920 | | MDTC_Small | 31 | 80(avg10) | 0.005357 | 0.005920 |

View File

@ -9,15 +9,15 @@ stage=0
stop_stage=4 stop_stage=4
num_keywords=2 num_keywords=2
config=conf/mdtc_small.yaml config=conf/ds_tcn.yaml
norm_mean=false norm_mean=true
norm_var=false norm_var=true
gpu_id=0 gpu_id=0
checkpoint= checkpoint=
dir=exp/mdtc_small dir=exp/ds_tcn
num_average=10 num_average=30
score_checkpoint=$dir/avg_${num_average}.pt score_checkpoint=$dir/avg_${num_average}.pt
download_dir=./data/local # your data dir download_dir=./data/local # your data dir
@ -82,6 +82,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
--num_workers 8 \ --num_workers 8 \
--num_keywords $num_keywords \ --num_keywords $num_keywords \
--min_duration 50 \ --min_duration 50 \
--seed 666 \
$cmvn_opts \ $cmvn_opts \
${checkpoint:+--checkpoint $checkpoint} ${checkpoint:+--checkpoint $checkpoint}
fi fi
@ -97,7 +98,7 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
# Compute posterior score # Compute posterior score
result_dir=$dir/test_$(basename $score_checkpoint) result_dir=$dir/test_$(basename $score_checkpoint)
mkdir -p $result_dir mkdir -p $result_dir
python kws/bin/score.py --gpu 1 \ python kws/bin/score.py --gpu $gpu_id \
--config $dir/config.yaml \ --config $dir/config.yaml \
--test_data data/test/data.list \ --test_data data/test/data.list \
--batch_size 256 \ --batch_size 256 \