From 4c8575878a3b5c2175221ee5e1a1c593ce20aa63 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Mon, 14 Nov 2022 13:52:14 +0800 Subject: [PATCH] Bug fix in ScheduledSampler --- egs/librispeech/ASR/pruned_transducer_stateless7/scaling.py | 1 + 1 file changed, 1 insertion(+) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/scaling.py b/egs/librispeech/ASR/pruned_transducer_stateless7/scaling.py index e04e5aa0c..fa9d47c35 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/scaling.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/scaling.py @@ -1023,6 +1023,7 @@ class ScheduledFloat(torch.nn.Module): next_x, next_y = self.schedule[i] if batch_count >= cur_x and batch_count <= next_x: return cur_y + (next_y - cur_y) * (batch_count - cur_x) / (next_x - cur_x) + cur_x, cur_y = next_x, next_y assert False FloatLike = Union[float, ScheduledFloat]