mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Update frame_reducer.py
Fix mistake
This commit is contained in:
parent
e4b82da41c
commit
63c7402297
@ -80,7 +80,7 @@ class FrameReducer(nn.Module):
|
|||||||
limit_lens = T - y_lens
|
limit_lens = T - y_lens
|
||||||
else:
|
else:
|
||||||
# In eval mode, ensure audio that is completely silent does not make any errors
|
# In eval mode, ensure audio that is completely silent does not make any errors
|
||||||
limit_lens = torch.ones_like(x_lens)
|
limit_lens = T - torch.ones_like(x_lens)
|
||||||
max_limit_len = limit_lens.max().int()
|
max_limit_len = limit_lens.max().int()
|
||||||
fake_limit_indexes = torch.topk(
|
fake_limit_indexes = torch.topk(
|
||||||
ctc_output[:, :, blank_id], max_limit_len
|
ctc_output[:, :, blank_id], max_limit_len
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user