mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 02:22:17 +00:00
Update model.py
This commit is contained in:
parent
7c47efd3e1
commit
bcec8465c9
@ -88,7 +88,7 @@ class Transducer(nn.Module):
|
|||||||
Return a tensor of shape (N, U).
|
Return a tensor of shape (N, U).
|
||||||
"""
|
"""
|
||||||
y_shift = F.pad(
|
y_shift = F.pad(
|
||||||
y, (context_size, 0), mode="constant", value=self.decoder.blank_id
|
y, (context_size, 0), mode="constant", value=-1
|
||||||
)[:, :-context_size]
|
)[:, :-context_size]
|
||||||
mask = y_shift != y
|
mask = y_shift != y
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user