mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Bug fix in ScheduledSampler
This commit is contained in:
parent
614b5b1a52
commit
4c8575878a
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user