docstr: TD-SpeakerBeam Forward.
  
  Args:
      input (torch.Tensor or ComplexTensor): Encoded feature [B, T, N]
      ilens (torch.Tensor): input lengths [Batch]
      input_aux (torch.Tensor or ComplexTensor): Encoded auxiliary feature
          for the target speaker [B, T, N] or [B, N]
      ilens_aux (torch.Tensor): input lengths of auxiliary input for the
          target speaker [Batch]
      suffix_tag (str): suffix to append to the keys in `others`
      additional (None or dict): additional parameters
          not used in this model
  
  Returns:
      masked (List[Union(torch.Tensor, ComplexTensor)]): [(B, T, N), ...]
      ilens (torch.Tensor): (B,)
      others predicted data, e.g. masks: OrderedDict[
          f'mask{suffix_tag}': torch.Tensor(Batch, Frames, Freq),
          f'enroll_emb{suffix_tag}': torch.Tensor(Batch, adapt_enroll_dim/adapt_enroll_dim*2),
      ]
code: def forward(
      self,
      input: Union[torch.Tensor, ComplexTensor],
      ilens: torch.Tensor,
      input_aux: torch.Tensor,
      ilens_aux: torch.Tensor,
      suffix_tag: str = "",
      additional: Optional[Dict] = None,
  ) -> Tuple[
      List[Union[torch.Tensor, ComplexTensor]],
      torch.Tensor,
      OrderedDict,
  ]:
      """TD-SpeakerBeam Forward.
  
      Args:
          input (torch.Tensor or ComplexTensor): Encoded feature [B, T, N]
          ilens (torch.Tensor): input lengths [Batch]
          input_aux (torch.Tensor or ComplexTensor): Encoded auxiliary feature
              for the target speaker [B, T, N] or [B, N]
          ilens_aux (torch.Tensor): input lengths of auxiliary input for the
              target speaker [Batch]
          suffix_tag (str): suffix to append to the keys in `others`
          additional (None or dict): additional parameters
              not used in this model
  
      Returns:
          masked (List[Union(torch.Tensor, ComplexTensor)]): [(B, T, N), ...]
          ilens (torch.Tensor): (B,)
          others predicted data, e.g. masks: OrderedDict[
              f'mask{suffix_tag}': torch.Tensor(Batch, Frames, Freq),
              f'enroll_emb{suffix_tag}': torch.Tensor(Batch, adapt_enroll_dim/adapt_enroll_dim*2),
          ]
      """  # noqa: E501
      # if complex spectrum
      feature = abs(input) if is_complex(input) else input
      aux_feature = (
          abs(input_aux) if is_complex(input_aux) else input_aux
      )
      B, L, N = feature.shape
  
      feature = feature.transpose(1, 2)  # B, N, L
      # NOTE(wangyou): When `self.use_spk_emb` is True, `aux_feature` is assumed to be
      # a speaker embedding; otherwise, it is assumed to be an enrollment audio.
      if self.use_spk_emb:
          # B, N, L'=1
          if aux_feature.dim() == 2:
              aux_feature = aux_feature.unsqueeze(-1)
          elif aux_feature.size(-2) == 1:
              assert aux_feature.dim() == 3, aux_feature.shape
              aux_feature = aux_feature.transpose(1, 2)
      else:
          aux_feature = aux_feature.transpose(1, 2)  # B, N, L'
  
      enroll_emb = self.auxiliary_net(aux_feature).squeeze(
          1
      )  # B, N', L'
      if not self.use_spk_emb:
          enroll_emb.masked_fill_(
              make_pad_mask(ilens_aux, enroll_emb, -1), 0.0
          )
      enroll_emb = enroll_emb.mean(dim=-1)  # B, N'
  
      mask = self.tcn(feature, enroll_emb)  # B, N, L
      mask = mask.transpose(-1, -2)  # B, L, N
  
      masked = input * mask
  
      others = {
          "enroll_emb{}".format(suffix_tag): enroll_emb.detach(),
      }
  
      return masked, ilens, others
  
file_path: espnet/espnet2/enh/extractor/td_speakerbeam_extractor.py
imports: from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from torch_complex.tensor import ComplexTensor
  from espnet2.enh.extractor.abs_extractor import AbsExtractor
  from espnet2.enh.layers.complex_utils import is_complex
  from espnet2.enh.layers.tcn import TemporalConvNet, TemporalConvNetInformed
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
label_desc: Use image node_id 2 for calling the TDSpeakerBeamExtractor obj's underlying member method code with example usage: obj.forward(input, ilens, input_aux, ilens_aux, suffix_tag, additional) and returns: masked,  ilens,  others