From ac7c2d84bc44dd83a5653f68677ae1ef16551eea Mon Sep 17 00:00:00 2001 From: PF Luo Date: Wed, 23 Feb 2022 08:33:20 +0800 Subject: [PATCH] minor fix for aishell recipe (#223) * just remove unnecessary torch.sum * minor fixs for aishell --- README.md | 2 +- egs/aishell/ASR/RESULTS.md | 14 +++++++------- egs/aishell/ASR/transducer_stateless/model.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 214e85ad0..6363aa2be 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ The best CER we currently have is: | | test | |-----|------| -| CER | 5.4 | +| CER | 5.05 | We provide a Colab notebook to run a pre-trained TransducerStateless model: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/14XaT2MhnBkK-3_RqqWq3K90Xlbin-GZC?usp=sharing) diff --git a/egs/aishell/ASR/RESULTS.md b/egs/aishell/ASR/RESULTS.md index ceb63b4cf..53cc394a1 100644 --- a/egs/aishell/ASR/RESULTS.md +++ b/egs/aishell/ASR/RESULTS.md @@ -46,12 +46,12 @@ python3 ./transducer_stateless/decode.py \ ### Aishell training results (Transducer-stateless) #### 2022-02-18 -(Pingfeng Luo) : The tensorboard log for training is available at +(Pingfeng Luo) : The tensorboard log for training is available at And pretrained model is available at ||test| |--|--| -|CER| 5.4% | +|CER| 5.05% | You can use the following commands to reproduce our results: @@ -61,17 +61,17 @@ export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7,8" --bucketing-sampler True \ --world-size 8 \ --lang-dir data/lang_char \ - --num-epochs 40 \ + --num-epochs 60 \ --start-epoch 0 \ - --exp-dir transducer_stateless/exp_char \ - --max-duration 160 \ + --exp-dir transducer_stateless/exp_rnnt_k2 \ + --max-duration 80 \ --lr-factor 3 ./transducer_stateless/decode.py \ - --epoch 39 \ + --epoch 59 \ --avg 10 \ --lang-dir data/lang_char \ - --exp-dir transducer_stateless/exp_char \ + --exp-dir transducer_stateless/exp_rnnt_k2 \ --max-duration 100 \ --decoding-method beam_search \ --beam-size 4 diff --git a/egs/aishell/ASR/transducer_stateless/model.py b/egs/aishell/ASR/transducer_stateless/model.py index 0322edeed..c19325a15 100644 --- a/egs/aishell/ASR/transducer_stateless/model.py +++ b/egs/aishell/ASR/transducer_stateless/model.py @@ -122,4 +122,4 @@ class Transducer(nn.Module): loss = k2.rnnt_loss(logits, y_padded, blank_id, boundary) - return torch.sum(loss) + return loss