Update egs/librispeech/ASR/pruned_transducer_stateless7_ctc_bs/frame_reducer.py
Co-authored-by: Fangjun Kuang <csukuangfj@gmail.com>
This commit is contained in:
parent
e49fe2e7c4
commit
8f4bfc7efd
@ -74,7 +74,7 @@ class FrameReducer(nn.Module):
|
|||||||
padding_mask = make_pad_mask(x_lens)
|
padding_mask = make_pad_mask(x_lens)
|
||||||
non_blank_mask = (ctc_output[:, :, blank_id] < math.log(0.9)) * (~padding_mask)
|
non_blank_mask = (ctc_output[:, :, blank_id] < math.log(0.9)) * (~padding_mask)
|
||||||
|
|
||||||
if y_lens is not None or self.training == False:
|
if y_lens is not None or self.training is False:
|
||||||
# Limit the maximum number of reduced frames
|
# Limit the maximum number of reduced frames
|
||||||
if y_lens is not None:
|
if y_lens is not None:
|
||||||
limit_lens = T - y_lens
|
limit_lens = T - y_lens
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user