ttslearn.util.make_non_pad_mask

ttslearn.util.make_non_pad_mask(lengths, maxlen=None)[source]

Make mask for non-padding frames

Parameters
  • lengths (list) – list of lengths

  • maxlen (int, optional) – maximum length. If None, use max value of lengths.

Returns

mask

Return type

torch.ByteTensor