class_docstr: Multihead Attention for S2ST.
docstr: Forward.
  Args:
      query (torch.Tensor): Query tensor (#batch, time1, size).
      key (torch.Tensor): Key tensor (#batch, time2, size).
      value (torch.Tensor): Value tensor (#batch, time2, size).
      mask (torch.Tensor): Mask tensor (#batch, 1, time2) or
          (#batch, time1, time2).
  
  Returns:
      torch.Tensor: Output tensor (#batch, time1, d_model).
docstr_tok: ["Forward",".","Args",":","query","(","torch.Tensor",")",":","Query","tensor","(","#","batch",",","time1",",","size",")",".","key","(","torch.Tensor",")",":","Key","tensor","(","#","batch",",","time2",",","size",")",".","value","(","torch.Tensor",")",":","Value","tensor","(","#","batch",",","time2",",","size",")",".","mask","(","torch.Tensor",")",":","Mask","tensor","(","#","batch",",","1",",","time2",")","or","(","#","batch",",","time1",",","time2",")",".","Returns",":","torch.Tensor",":","Output","tensor","(","#","batch",",","time1",",","d_model",")","."]
code: def forward(
      self,
      query: torch.Tensor,
      key: torch.Tensor,
      value: torch.Tensor,
      mask: torch.Tensor,
  ):
      """Forward.
      Args:
          query (torch.Tensor): Query tensor (#batch, time1, size).
          key (torch.Tensor): Key tensor (#batch, time2, size).
          value (torch.Tensor): Value tensor (#batch, time2, size).
          mask (torch.Tensor): Mask tensor (#batch, 1, time2) or
              (#batch, time1, time2).
  
      Returns:
          torch.Tensor: Output tensor (#batch, time1, d_model).
      """
      return self.attn(query, key, value, mask)
  
file_path: espnet/espnet2/s2st/aux_attention/multihead.py
imports: import torch
  import torch.nn.functional
  from typeguard import check_argument_types
  from espnet2.s2st.aux_attention.abs_aux_attention import AbsS2STAuxAttention
  from espnet2.utils.types import str2bool
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention
label_desc: Use image node_id 2 for calling the MultiHeadAttention obj's underlying member method code with example usage: obj.forward(query, key, value, mask) and returns: self