Skip to content

Commit a513db5

Browse files
author
Rafael Valle
committed
utils.py: compatibility with new pytorch
1 parent 37a033d commit a513db5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def get_mask_from_lengths(lengths):
77
max_len = torch.max(lengths).item()
88
ids = torch.arange(0, max_len, out=torch.cuda.LongTensor(max_len))
9-
mask = (ids < lengths.unsqueeze(1)).byte()
9+
mask = (ids < lengths.unsqueeze(1)).bool()
1010
return mask
1111

1212

0 commit comments

Comments
 (0)