Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
重构encoder 支持wenet/transformer/encoder's dynamic chunk training
QA
0 为什么要支持paraformer mask training?
尝试使用pretrain的非流paraformer,fintune训练u2++ like的流式模型,看是否可以得到好的效果
1 为什么要有:IdentitySubsampling?
因为wenet顺序是: cmvn->subsampling->pos emb
paraformer 顺序是: lfr(subsampling) ->cmvn -> pos_emb
所以这里实现了个IdentitySubsampling, 什么也不做,只是调用了pos emb class,保持接口不变
2 paraformer fsm block中有padding, 可能对流式训练有影响(训练和推理chunk不一致)
TODO
example:
ctc_weight: 0.3
use_dynamic_chunk: true
Next PR