Open zqwang7 opened 8 months ago
Thanks for the report.
@simpleoier, can you check this? The logic of statistics collection is complicated...
Hi @zqwang7 , in (1), it is not supposed to pass normalize flag, because it is the collect stats. I assume the error (2) is because no stats were generated in collect stats. In your asr_config, do you have something like "extract_feats_in_collect_stats"?
@simpleoier I was using the config file https://github.com/espnet/espnet/blob/2aa734d65013a0b33a6f8cb59b22159a87360eb8/egs2/chime4/asr1/conf/tuning/train_asr_transformer_wavlm_lr1e-3_specaug_accum1_preenc128_warmup20k.yaml which does not set extract_feats_in_collect_stats and feats_normalize. Then the default value of feats_normalize would cause errors.
I also don't see the flags are configured in the config files in https://github.com/espnet/espnet/tree/2aa734d65013a0b33a6f8cb59b22159a87360eb8/egs2/chime4/asr1/conf/tuning
Maybe, in egs2/TEMPLATE/asr1/asr.sh, the default value of feats_normalize can be just changed to empty?
@zqwang7 line 66 uses extract_feats_in_collect_stats
.
Describe the bug I obverve two problems:
(1) In https://github.com/espnet/espnet/blob/2aa734d65013a0b33a6f8cb59b22159a87360eb8/egs2/TEMPLATE/asr1/asr.sh#L1265, the feats_normalize flag (set to global_mvn in default) is not passed to espnet2.bin.asr_train. This causes errors in later espnet2.bin.aggregate_stats_dirs, https://github.com/espnet/espnet/blob/2aa734d65013a0b33a6f8cb59b22159a87360eb8/egs2/TEMPLATE/asr1/asr.sh#L1290
(2) Even if I pass "--normalize $feats_normalize" to espnet2.bin.asr_train, when feats_normalize is global_mvn, this produces errors. It seems that global mean and var are not computed and saved to .npz files. When I pass in utterance_mvn, the code is fine.