From c7107ead6417ef911cef379898df8bf713ac0875 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Sat, 7 Jan 2023 17:45:22 +0800 Subject: [PATCH] Fix bug in get_adjusted_batch_count --- egs/librispeech/ASR/pruned_transducer_stateless7/train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/train.py b/egs/librispeech/ASR/pruned_transducer_stateless7/train.py index 3cefc9d96..6f6e9137d 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/train.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/train.py @@ -100,8 +100,9 @@ def get_adjusted_batch_count( params: AttributeDict) -> float: # returns the number of batches we would have used so far if we had used the reference # duration. This is for purposes of set_batch_count(). - return (params.batch_idx_train * params.ref_duration / - (params.max_duration * params.world_size)) + return (params.batch_idx_train * (params.max_duration * params.world_size) / + params.ref_duration) +