mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Update decoder.py (#1262)
This commit is contained in:
parent
7e1288af50
commit
bbb03f7962
@ -71,6 +71,10 @@ class Decoder(nn.Module):
|
|||||||
groups=decoder_dim // 4, # group size == 4
|
groups=decoder_dim // 4, # group size == 4
|
||||||
bias=False,
|
bias=False,
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
# To avoid `RuntimeError: Module 'Decoder' has no attribute 'conv'`
|
||||||
|
# when inference with torch.jit.script and context_size == 1
|
||||||
|
self.conv = nn.Identity()
|
||||||
|
|
||||||
def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor:
|
def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user