class_docstr: DNN mask based Beamformer.
  
  Citation:
      Multichannel End-to-end Speech Recognition; T. Ochiai et al., 2017;
      http://proceedings.mlr.press/v70/ochiai17a/ochiai17a.pdf
class_docstr_tok: ["DNN","mask","based","Beamformer",".","Citation",":","Multichannel","End-to-end","Speech","Recognition",";","T.","Ochiai","et","al.",",","2017",";","http",":","\/\/proceedings.mlr.press\/v70\/ochiai17a\/ochiai17a.pdf"]
docstr: Predict masks for beamforming.
  
  Args:
      data (torch.complex64/ComplexTensor): (B, T, C, F), double precision
      ilens (torch.Tensor): (B,)
  Returns:
      masks (torch.Tensor): (B, T, C, F)
      ilens (torch.Tensor): (B,)
docstr_tok: ["Predict","masks","for","beamforming",".","Args",":","data","(","torch.complex64\/ComplexTensor",")",":","(","B",",","T",",","C",",","F",")",",","double","precision","ilens","(","torch.Tensor",")",":","(","B",",",")","Returns",":","masks","(","torch.Tensor",")",":","(","B",",","T",",","C",",","F",")","ilens","(","torch.Tensor",")",":","(","B",",",")"]
code: def predict_mask(
      self,
      data: Union[torch.Tensor, ComplexTensor],
      ilens: torch.LongTensor,
  ) -> Tuple[Tuple[torch.Tensor, ...], torch.LongTensor]:
      """Predict masks for beamforming.
  
      Args:
          data (torch.complex64/ComplexTensor): (B, T, C, F), double precision
          ilens (torch.Tensor): (B,)
      Returns:
          masks (torch.Tensor): (B, T, C, F)
          ilens (torch.Tensor): (B,)
      """
      masks, _ = self.mask(to_float(data.permute(0, 3, 2, 1)), ilens)
      # (B, F, C, T) -> (B, T, C, F)
      masks = [m.transpose(-1, -3) for m in masks]
      return masks, ilens
  
file_path: espnet/espnet2/enh/layers/dnn_beamformer.py
imports: import logging
  from typing import List, Optional, Tuple, Union
  import torch
  from packaging.version import parse
  from torch.nn import functional
  from torch_complex.tensor import ComplexTensor
  import espnet2.enh.layers.beamformer
  import espnet2.enh.layers.beamformer_th
  from espnet2.enh.layers.complex_utils import stack, to_double, to_float
  from espnet2.enh.layers.mask_estimator import MaskEstimator
label_desc: Use image node_id 4 for calling the DNN_Beamformer obj's underlying member method code with example usage: obj.predict_mask(data, ilens) and returns: masks,  ilens