docstr: Whole forward of asteroid models.
  
  Args:
      input (torch.Tensor): Raw Waveforms [B, T]
      ilens (torch.Tensor): input lengths [B]
      additional (Dict or None): other data included in model
  
  Returns:
      estimated Waveforms(List[Union(torch.Tensor]): [(B, T), ...]
      ilens (torch.Tensor): (B,)
      others predicted data, e.g. masks: OrderedDict[
          'mask_spk1': torch.Tensor(Batch, T),
          'mask_spk2': torch.Tensor(Batch, T),
          ...
          'mask_spkn': torch.Tensor(Batch, T),
      ]
docstr_tok: ["Whole","forward","of","asteroid","models",".","Args",":","input","(","torch.Tensor",")",":","Raw","Waveforms","[","B",",","T","]","ilens","(","torch.Tensor",")",":","input","lengths","[","B","]","additional","(","Dict","or","None",")",":","other","data","included","in","model","Returns",":","estimated","Waveforms","(","List","[","Union","(","torch.Tensor","]",")",":","[","(","B",",","T",")",",","...","]","ilens","(","torch.Tensor",")",":","(","B",",",")","others","predicted","data",",","e.g",".","masks",":","OrderedDict","[","'mask_spk1","'",":","torch.Tensor","(","Batch",",","T",")",",","'mask_spk2","'",":","torch.Tensor","(","Batch",",","T",")",",","...","'mask_spkn","'",":","torch.Tensor","(","Batch",",","T",")",",","]"]
code: def forward(
      self,
      input: torch.Tensor,
      ilens: torch.Tensor = None,
      additional: Optional[Dict] = None,
  ):
      """Whole forward of asteroid models.
  
      Args:
          input (torch.Tensor): Raw Waveforms [B, T]
          ilens (torch.Tensor): input lengths [B]
          additional (Dict or None): other data included in model
  
      Returns:
          estimated Waveforms(List[Union(torch.Tensor]): [(B, T), ...]
          ilens (torch.Tensor): (B,)
          others predicted data, e.g. masks: OrderedDict[
              'mask_spk1': torch.Tensor(Batch, T),
              'mask_spk2': torch.Tensor(Batch, T),
              ...
              'mask_spkn': torch.Tensor(Batch, T),
          ]
      """
  
      if hasattr(self.model, "forward_wav"):
          est_source = self.model.forward_wav(
              input
          )  # B,nspk,T or nspk,T
      else:
          est_source = self.model(input)  # B,nspk,T or nspk,T
  
      if input.dim() == 1:
          assert est_source.size(0) == self.num_spk, est_source.size(0)
      else:
          assert est_source.size(1) == self.num_spk, est_source.size(1)
  
      est_source = [
          es for es in est_source.transpose(0, 1)
      ]  # List(M,T)
      masks = OrderedDict(
          zip(
              ["mask_spk{}".format(i + 1) for i in range(self.num_spk)],
              est_source,
          )
      )
      return est_source, ilens, masks
  
file_path: espnet/espnet2/enh/separator/asteroid_models.py
imports: import warnings
  from collections import OrderedDict
  from typing import Dict, Optional, Tuple
  import torch
  from espnet2.enh.separator.abs_separator import AbsSeparator
label_desc: Use image node_id 2 for calling the AsteroidModel_Converter obj's underlying member method code with example usage: obj.forward(input, ilens, additional) and returns: est_source,  ilens,  masks