Skip to content

Commit

Permalink
Update decoder.py (#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr authored Sep 20, 2023
1 parent 7e1288a commit bbb03f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions egs/librispeech/ASR/pruned_transducer_stateless7/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def __init__(
groups=decoder_dim // 4, # group size == 4
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:
"""
Expand Down

0 comments on commit bbb03f7

Please sign in to comment.