61 Commits

Author SHA1 Message Date
huangruizhe
6693d907d3
shuffle full Librispeech data (#574)
* shuffled full/partial librispeech data

* fixed the code style issue

* Shuffled full librispeech data off-line

* Fixed style, addressed comments, and removed redandunt codes

* Used the suggested version of black

* Propagated the changes to other folders for librispeech (except
conformer_mmi and streaming_conformer_ctc)
2022-11-27 11:26:09 +08:00
Desh Raj
d31db01037 manual correction of black formatting 2022-11-17 14:18:05 -05:00
Desh Raj
107df3b115 apply black on all files 2022-11-17 09:42:17 -05:00
Fangjun Kuang
60317120ca
Revert "Apply new Black style changes" 2022-11-17 20:19:32 +08:00
Desh Raj
d110b04ad3 apply new black formatting to all files 2022-11-16 13:06:43 -05:00
Fangjun Kuang
e334e570d8
Filter utterances with number_tokens > number_feature_frames. (#604) 2022-11-12 07:57:58 +08:00
Zengwei Yao
3600ce1b5f
Apply delay penalty on transducer (#654)
* add delay penalty

* fix CI

* fix CI
2022-11-04 16:10:09 +08:00
Zengwei Yao
f2f5baf687
Use ScaledLSTM as streaming encoder (#479)
* add ScaledLSTM

* add RNNEncoderLayer and RNNEncoder classes in lstm.py

* add RNN and Conv2dSubsampling classes in lstm.py

* hardcode bidirectional=False

* link from pruned_transducer_stateless2

* link scaling.py pruned_transducer_stateless2

* copy from pruned_transducer_stateless2

* modify decode.py pretrained.py test_model.py train.py

* copy streaming decoding files from pruned_transducer_stateless2

* modify streaming decoding files

* simplified code in ScaledLSTM

* flat weights after scaling

* pruned2 -> pruned4

* link __init__.py

* fix style

* remove add_model_arguments

* modify .flake8

* fix style

* fix scale value in scaling.py

* add random combiner for training deeper model

* add using proj_size

* add scaling converter for ScaledLSTM

* support jit trace

* add using averaged model in export.py

* modify test_model.py, test if the model can be successfully exported by jit.trace

* modify pretrained.py

* support streaming decoding

* fix model.py

* Add cut_id to recognition results

* Add cut_id to recognition results

* do not pad in Conv subsampling module; add tail padding during decoding.

* update RESULTS.md

* minor fix

* fix doc

* update README.md

* minor change, filter infinite loss

* remove the condition of raise error

* modify type hint for the return value in model.py

* minor change

* modify RESULTS.md

Co-authored-by: pkufool <wkang.pku@gmail.com>
2022-08-19 14:38:45 +08:00
marcoyang1998
c74cec59e9
propagate changes from #525 to other librispeech recipes (#531)
* propaga changes from #525 to other librispeech recipes

* refactor display_and_save_batch to utils

* fixed typo

* reformat code style
2022-08-17 17:18:15 +08:00
Fangjun Kuang
1f7832b93c
Fix loading sampler state dict. (#421)
* Fix loading sampler state dict.

* skip scan_pessimistic_batches_for_oom if params.start_batch > 0
2022-08-06 10:00:08 +08:00
Zengwei Yao
8203d10be7
Add stats about duration and padding proportion (#485)
* add stats about duration and padding proportion

* add  for utt_duration

* add stats for other recipes

* add stats for other 2 recipes

* modify doc

* minor change
2022-07-25 16:40:43 +08:00
Wei Kang
6e609c67a2
Using streaming conformer as transducer encoder (#380)
* support streaming in conformer

* Add more documents

* support streaming on pruned_transducer_stateless2; add delay penalty; fixes for decode states

* Minor fixes

* streaming for pruned_transducer_stateless4

* Fix conv cache error, support async streaming decoding

* Fix style

* Fix style

* Fix style

* Add torch.jit.export

* mask the initial cache

* Cutting off invalid frames of encoder_embed output

* fix relative positional encoding in streaming decoding for compution saving

* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes

* Fix jit export for torch 1.6

* Minor fixes for streaming decoding

* Minor fixes on decode stream

* move model parameters to train.py

* make states in forward streaming optional

* update pretrain to support streaming model

* update results.md

* update tensorboard and pre-models

* fix typo

* Fix tests

* remove unused arguments

* add streaming decoding ci

* Minor fix

* Minor fix

* disable right context by default
2022-06-28 00:18:54 +08:00
Zengwei Yao
a42d96dfe0
Fix warmup (#435)
* fix warmup when scan_pessimistic_batches_for_oom

* delete comments
2022-06-20 13:40:01 +08:00
Quandwang
8512aaf585
fix typos (#409) 2022-06-08 20:08:44 +08:00
Daniel Povey
4e23fb2252
Improve diagnostics code memory-wise and accumulate more stats. (#373)
* Update diagnostics, hopefully print more stats.

# Conflicts:
#	egs/librispeech/ASR/pruned_transducer_stateless4b/train.py

* Remove memory-limit options arg

* Remove unnecessary option for diagnostics code, collect on more batches
2022-05-19 11:45:59 +08:00
Fangjun Kuang
32f05c00e3
Save batch to disk on exception. (#350) 2022-05-06 17:49:40 +08:00
Fangjun Kuang
e1c3e98980
Save batch to disk on OOM. (#343)
* Save batch to disk on OOM.

* minor fixes

* Fixes after review.

* Fix style issues.
2022-05-05 15:09:23 +08:00
pehonnet
9a98e6ced6
fix fp16 option in example usage (#332) 2022-04-25 18:51:53 +08:00
Mingshuang Luo
93c60a9d30
Code style check for librispeech pruned transducer stateless2 (#308) 2022-04-11 22:15:18 +08:00
Wei Kang
7012fd65b5
Support mix precision training on the reworked model (#305)
* Add mix precision support

* Minor fixes

* Minor fixes

* Minor fixes
2022-04-11 16:49:54 +08:00
Daniel Povey
5078332088 Fix adding learning rate to tensorboard 2022-04-11 14:58:15 +08:00
Daniel Povey
46d52dda10 Fix dir names 2022-04-11 12:03:41 +08:00
Daniel Povey
962cf868c9 Fix import 2022-04-10 15:31:46 +08:00
Daniel Povey
d1e4ae788d Refactor how learning rate is set. 2022-04-10 15:25:27 +08:00
Daniel Povey
82d58629ea Implement 2p version of learning rate schedule. 2022-04-10 13:50:31 +08:00
Daniel Povey
da50525ca5 Make lrate rule more symmetric 2022-04-10 13:25:40 +08:00
Daniel Povey
4d41ee0caa Implement 2o schedule 2022-04-09 18:37:03 +08:00
Daniel Povey
db72aee1f0 Set 2n rule.. 2022-04-09 18:15:56 +08:00
Daniel Povey
0f8ee68af2 Fix bug 2022-04-08 16:53:42 +08:00
Daniel Povey
f587cd527d Change exponential part of lrate to be epoch based 2022-04-08 16:24:21 +08:00
Daniel Povey
6ee32cf7af Set new scheduler 2022-04-08 16:10:06 +08:00
Daniel Povey
a41e93437c Change some defaults in LR-setting rule. 2022-04-06 12:36:58 +08:00
Daniel Povey
d1a669162c Fix bug in lambda 2022-04-05 13:31:52 +08:00
Daniel Povey
ed8eba91e1 Reduce model_warm_step from 4k to 3k 2022-04-05 13:24:09 +08:00
Daniel Povey
c3169222ae Simplified optimizer, rework somet things.. 2022-04-05 13:23:02 +08:00
Daniel Povey
0f5957394b Fix to reading scheudler from optim 2022-04-05 12:58:43 +08:00
Daniel Povey
1548cc7462 Fix checkpoint-writing 2022-04-05 11:19:40 +08:00
Daniel Povey
234366e51c Fix type of parameter 2022-04-05 00:18:36 +08:00
Daniel Povey
d1f2f93460 Some fixes.. 2022-04-04 22:40:18 +08:00
Daniel Povey
72f4a673b1 First draft of new approach to learning rates + init 2022-04-04 20:21:34 +08:00
Daniel Povey
4929e4cf32 Change how warm-step is set 2022-04-04 17:09:25 +08:00
Daniel Povey
34500afc43 Various bug fixes 2022-04-02 20:06:43 +08:00
Daniel Povey
8be10d3d6c First draft of model rework 2022-04-02 20:03:21 +08:00
Daniel Povey
eec597fdd5 Merge changes from master 2022-04-02 18:45:20 +08:00
Daniel Povey
709c387ce6 Initial refactoring to remove unnecessary vocab_size 2022-03-30 21:40:22 +08:00
Daniel Povey
4e453a4bf9 Rework conformer, remove some code. 2022-03-29 23:41:13 +08:00
Daniel Povey
11124b03ea Refactoring and simplifying conformer and frontend 2022-03-29 20:32:14 +08:00
Daniel Povey
262388134d Increase model_warm_step to 4k 2022-03-27 11:18:16 +08:00
Daniel Povey
d2ed3dfc90 Fix bug 2022-03-25 20:35:11 +08:00
Daniel Povey
4b650e9f01 Make warmup work by scaling layer contributions; leave residual layer-drop 2022-03-25 20:34:33 +08:00