Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egs2/TEMPLATE/asr1/asr.sh not passing feats_normalize flag to espnet2.bin.asr_train #5674

Open
zqwang7 opened this issue Feb 23, 2024 · 4 comments
Labels
Bug bug should be fixed

Comments

@zqwang7
Copy link
Contributor

zqwang7 commented Feb 23, 2024

Describe the bug
I obverve two problems:

(1) In

${train_cmd} JOB=1:"${_nj}" "${_logdir}"/stats.JOB.log \
, 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,
${python} -m espnet2.bin.aggregate_stats_dirs ${_opts} --output_dir "${asr_stats_dir}"

(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.

@zqwang7 zqwang7 added the Bug bug should be fixed label Feb 23, 2024
@sw005320
Copy link
Contributor

Thanks for the report.

@simpleoier, can you check this?
The logic of statistics collection is complicated...

@simpleoier
Copy link
Collaborator

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"?

@zqwang7
Copy link
Contributor Author

zqwang7 commented Feb 23, 2024

@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?

@simpleoier
Copy link
Collaborator

@zqwang7 line 66 uses extract_feats_in_collect_stats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug bug should be fixed
Projects
None yet
Development

No branches or pull requests

3 participants