class_docstr: This is a single-scale implementation of `BiAttentionBlock`.
  
  The only differenece between it and `BiAttentionBlock` is that the
  `forward` function of `SingleScaleBiAttentionBlock` only accepts a single
  flatten visual feature map, while the `forward` function in
  `BiAttentionBlock` accepts multiple visual feature maps.
class_docstr_tok: ["This","is","a","single-scale","implementation","of","`","BiAttentionBlock","`",".","The","only","differenece","between","it","and","`","BiAttentionBlock","`","is","that","the","`","forward","`","function","of","`","SingleScaleBiAttentionBlock","`","only","accepts","a","single","flatten","visual","feature","map",",","while","the","`","forward","`","function","in","`","BiAttentionBlock","`","accepts","multiple","visual","feature","maps","."]
docstr: Single-scale forward pass.
  
  Args:
      visual_feature (Tensor): The visual input tensor. Tensor of
          shape (bs, patch_len, ch).
      lang_feature (Tensor): The language input tensor. Tensor of
          shape (bs, text_len, ch).
      attention_mask_v (_type_, optional): Visual feature attention
          mask. Defaults to None.
      attention_mask_l (_type_, optional): Language feature attention
          mask.Defaults to None.
docstr_tok: ["Single-scale","forward","pass",".","Args",":","visual_feature","(","Tensor",")",":","The","visual","input","tensor",".","Tensor","of","shape","(","bs",",","patch_len",",","ch",")",".","lang_feature","(","Tensor",")",":","The","language","input","tensor",".","Tensor","of","shape","(","bs",",","text_len",",","ch",")",".","attention_mask_v","(","_type_",",","optional",")",":","Visual","feature","attention","mask",".","Defaults","to","None",".","attention_mask_l","(","_type_",",","optional",")",":","Language","feature","attention","mask.Defaults","to","None","."]
code: def forward(
      self,
      visual_feature: Tensor,
      lang_feature: Tensor,
      attention_mask_v=None,
      attention_mask_l=None,
  ):
      """Single-scale forward pass.
  
      Args:
          visual_feature (Tensor): The visual input tensor. Tensor of
              shape (bs, patch_len, ch).
          lang_feature (Tensor): The language input tensor. Tensor of
              shape (bs, text_len, ch).
          attention_mask_v (_type_, optional): Visual feature attention
              mask. Defaults to None.
          attention_mask_l (_type_, optional): Language feature attention
              mask.Defaults to None.
      """
      new_v, new_lang_feature = self.single_attention_call(
          visual_feature,
          lang_feature,
          attention_mask_v=attention_mask_v,
          attention_mask_l=attention_mask_l,
      )
      return new_v, new_lang_feature
  
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 1 for calling the SingleScaleBiAttentionBlock obj's underlying member method code with example usage: obj.forward(visual_feature, lang_feature, attention_mask_v, attention_mask_l) and returns: new_v,  new_lang_feature