class_docstr: Bidirectional fusion Multi-Head Attention layer.
  
  Args:
      v_dim (int): The dimension of the vision input.
      l_dim (int): The dimension of the language input.
      embed_dim (int): The embedding dimension for the attention operation.
      num_heads (int): The number of attention heads.
      dropout (float, optional): The dropout probability. Defaults to 0.1.
class_docstr_tok: ["Bidirectional","fusion","Multi-Head","Attention","layer",".","Args",":","v_dim","(","int",")",":","The","dimension","of","the","vision","input",".","l_dim","(","int",")",":","The","dimension","of","the","language","input",".","embed_dim","(","int",")",":","The","embedding","dimension","for","the","attention","operation",".","num_heads","(","int",")",":","The","number","of","attention","heads",".","dropout","(","float",",","optional",")",":","The","dropout","probability",".","Defaults","to","0.1","."]
code: def _shape(self, tensor: Tensor, seq_len: int, bsz: int):
      return (
          tensor.view(bsz, seq_len, self.num_heads, self.head_dim)
          .transpose(1, 2)
          .contiguous()
      )
  
imports: import math
  from typing import Dict, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from mmcv.cnn.bricks import DropPath
  from torch import Tensor
label_desc: Use image node_id 2 for calling the BiMultiHeadAttention obj's underlying member method code with example usage: obj._shape(tensor, seq_len, bsz) and returns: tensor