Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kamo-naoyuki committed May 12, 2022
1 parent 7d52422 commit f899a05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions espnet/nets/pytorch_backend/nets_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def make_pad_mask(lengths, xs=None, length_dim=-1, maxlen=None):

if not isinstance(lengths, list):
lengths = lengths.tolist()
else:
assert isinstance(lengths, torch.tensor), type(lengths)
lengths = lengths.long()

bs = int(len(lengths))
if maxlen is None:
if xs is None:
Expand Down

0 comments on commit f899a05

Please sign in to comment.