ttslearn.util.make_pad_mask

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

Make mask for 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