class_docstr: Conv-TasNet architecture introduced in
  *Conv-TasNet: Surpassing Ideal Time–Frequency Magnitude Masking for Speech Separation*
  :cite:`Luo_2019`.
  
  Note:
      This implementation corresponds to the "non-causal" setting in the paper.
  
  See Also:
      * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models.
  
  Args:
      num_sources (int, optional): The number of sources to split.
      enc_kernel_size (int, optional): The convolution kernel size of the encoder/decoder, <L>.
      enc_num_feats (int, optional): The feature dimensions passed to mask generator, <N>.
      msk_kernel_size (int, optional): The convolution kernel size of the mask generator, <P>.
      msk_num_feats (int, optional): The input/output feature dimension of conv block in the mask generator, <B, Sc>.
      msk_num_hidden_feats (int, optional): The internal feature dimension of conv block of the mask generator, <H>.
      msk_num_layers (int, optional): The number of layers in one conv block of the mask generator, <X>.
      msk_num_stacks (int, optional): The numbr of conv blocks of the mask generator, <R>.
      msk_activate (str, optional): The activation function of the mask output (Default: ``sigmoid``).
docstr: Pad input Tensor so that the end of the input tensor corresponds with
  
  1. (if kernel size is odd) the center of the last convolution kernel
  or 2. (if kernel size is even) the end of the first half of the last convolution kernel
  
  Assumption:
      The resulting Tensor will be padded with the size of stride (== kernel_width // 2)
      on the both ends in Conv1D
  
  |<--- k_1 --->|
  |      |            |<-- k_n-1 -->|
  |      |                  |  |<--- k_n --->|
  |      |                  |         |      |
  |      |                  |         |      |
  |      v                  v         v      |
  |<---->|<--- input signal --->|<--->|<---->|
   stride                         PAD  stride
  
  Args:
      input (torch.Tensor): 3D Tensor with shape (batch_size, channels==1, frames)
  
  Returns:
      Tensor: Padded Tensor
      int: Number of paddings performed
docstr_tok: ["Pad","input","Tensor","so","that","the","end","of","the","input","tensor","corresponds","with","1",".","(","if","kernel","size","is","odd",")","the","center","of","the","last","convolution","kernel","or","2",".","(","if","kernel","size","is","even",")","the","end","of","the","first","half","of","the","last","convolution","kernel","Assumption",":","The","resulting","Tensor","will","be","padded","with","the","size","of","stride","(","==","kernel_width","\/\/","2",")","on","the","both","ends","in","Conv1D","|","<","--","-","k_1","--","-",">","|","|","|","|","<","--","k_n-1","--",">","|","|","|","|","|","<","--","-","k_n","--","-",">","|","|","|","|","|","|","|","|","|","|","|","|","v","v","v","|","|","<","--","--",">","|","<","--","-","input","signal","--","-",">","|","<","--","-",">","|","<","--","--",">","|","stride","PAD","stride","Args",":","input","(","torch.Tensor",")",":","3D","Tensor","with","shape","(","batch_size",",","channels==1",",","frames",")","Returns",":","Tensor",":","Padded","Tensor","int",":","Number","of","paddings","performed"]
code: def _align_num_frames_with_strides(
      self, input: torch.Tensor
  ) -> Tuple[torch.Tensor, int]:
      """Pad input Tensor so that the end of the input tensor corresponds with
  
      1. (if kernel size is odd) the center of the last convolution kernel
      or 2. (if kernel size is even) the end of the first half of the last convolution kernel
  
      Assumption:
          The resulting Tensor will be padded with the size of stride (== kernel_width // 2)
          on the both ends in Conv1D
  
      |<--- k_1 --->|
      |      |            |<-- k_n-1 -->|
      |      |                  |  |<--- k_n --->|
      |      |                  |         |      |
      |      |                  |         |      |
      |      v                  v         v      |
      |<---->|<--- input signal --->|<--->|<---->|
       stride                         PAD  stride
  
      Args:
          input (torch.Tensor): 3D Tensor with shape (batch_size, channels==1, frames)
  
      Returns:
          Tensor: Padded Tensor
          int: Number of paddings performed
      """
      batch_size, num_channels, num_frames = input.shape
      is_odd = self.enc_kernel_size % 2
      num_strides = (num_frames - is_odd) // self.enc_stride
      num_remainings = num_frames - (
          is_odd + num_strides * self.enc_stride
      )
      if num_remainings == 0:
          return input, 0
  
      num_paddings = self.enc_stride - num_remainings
      pad = torch.zeros(
          batch_size,
          num_channels,
          num_paddings,
          dtype=input.dtype,
          device=input.device,
      )
      return torch.cat([input, pad], 2), num_paddings
  
file_path: audio/src/torchaudio/models/conv_tasnet.py
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 2 for calling the ConvTasNet obj's underlying member method code with example usage: obj._align_num_frames_with_strides(input) and returns: torch,  num_paddings, input,  int