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: Perform source separation. Generate audio source waveforms.
  
  Args:
      input (torch.Tensor): 3D Tensor with shape [batch, channel==1, frames]
  
  Returns:
      Tensor: 3D Tensor with shape [batch, channel==num_sources, frames]
docstr_tok: ["Perform","source","separation",".","Generate","audio","source","waveforms",".","Args",":","input","(","torch.Tensor",")",":","3D","Tensor","with","shape","[","batch",",","channel==1",",","frames","]","Returns",":","Tensor",":","3D","Tensor","with","shape","[","batch",",","channel==num_sources",",","frames","]"]
code: def forward(self, input: torch.Tensor) -> torch.Tensor:
      """Perform source separation. Generate audio source waveforms.
  
      Args:
          input (torch.Tensor): 3D Tensor with shape [batch, channel==1, frames]
  
      Returns:
          Tensor: 3D Tensor with shape [batch, channel==num_sources, frames]
      """
      if input.ndim != 3 or input.shape[1] != 1:
          raise ValueError(
              f"Expected 3D tensor (batch, channel==1, frames). Found: {input.shape}"
          )
  
      # B: batch size
      # L: input frame length
      # L': padded input frame length
      # F: feature dimension
      # M: feature frame length
      # S: number of sources
  
      padded, num_pads = self._align_num_frames_with_strides(
          input
      )  # B, 1, L'
      batch_size, num_padded_frames = padded.shape[0], padded.shape[2]
      feats = self.encoder(padded)  # B, F, M
      masked = self.mask_generator(feats) * feats.unsqueeze(
          1
      )  # B, S, F, M
      masked = masked.view(
          batch_size * self.num_sources, self.enc_num_feats, -1
      )  # B*S, F, M
      decoded = self.decoder(masked)  # B*S, 1, L'
      output = decoded.view(
          batch_size, self.num_sources, num_padded_frames
      )  # B, S, L'
      if num_pads > 0:
          output = output[..., :-num_pads]  # B, S, L
      return output
  
file_path: audio/src/torchaudio/models/conv_tasnet.py
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the ConvTasNet obj's underlying member method code with example usage: obj.forward(input) and returns: output