class_docstr: Bidirectional Corner Pooling Module (TopLeft, BottomRight, etc.)
  
  Args:
      in_channels (int): Input channels of module.
      directions (list[str]): Directions of two CornerPools.
      out_channels (int): Output channels of module.
      feat_channels (int): Feature channels of module.
      norm_cfg (:obj:`ConfigDict` or dict): Dictionary to construct
          and config norm layer.
      init_cfg (:obj:`ConfigDict` or dict, optional): the config to
          control the initialization.
class_docstr_tok: ["Bidirectional","Corner","Pooling","Module","(","TopLeft",",","BottomRight",",","etc",".",")","Args",":","in_channels","(","int",")",":","Input","channels","of","module",".","directions","(","list","[","str","]",")",":","Directions","of","two","CornerPools",".","out_channels","(","int",")",":","Output","channels","of","module",".","feat_channels","(","int",")",":","Feature","channels","of","module",".","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Dictionary","to","construct","and","config","norm","layer",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","the","config","to","control","the","initialization","."]
docstr: Forward features from the upstream network.
  
  Args:
      x (tensor): Input feature of BiCornerPool.
  
  Returns:
      conv2 (tensor): Output feature of BiCornerPool.
docstr_tok: ["Forward","features","from","the","upstream","network",".","Args",":","x","(","tensor",")",":","Input","feature","of","BiCornerPool",".","Returns",":","conv2","(","tensor",")",":","Output","feature","of","BiCornerPool","."]
code: def forward(self, x: Tensor) -> Tensor:
      """Forward features from the upstream network.
  
      Args:
          x (tensor): Input feature of BiCornerPool.
  
      Returns:
          conv2 (tensor): Output feature of BiCornerPool.
      """
      direction1_conv = self.direction1_conv(x)
      direction2_conv = self.direction2_conv(x)
      direction1_feat = self.direction1_pool(direction1_conv)
      direction2_feat = self.direction2_pool(direction2_conv)
      aftpool_conv = self.aftpool_conv(
          direction1_feat + direction2_feat
      )
      conv1 = self.conv1(x)
      relu = self.relu(aftpool_conv + conv1)
      conv2 = self.conv2(relu)
      return conv2
  
imports: from logging import warning
  from math import ceil, log
  from typing import List, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmcv.ops import CornerPool, batched_nms
  from mmengine.config import ConfigDict
  from mmengine.model import BaseModule, bias_init_with_prob
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, InstanceList, OptConfigType, OptInstanceList, OptMultiConfig
  from ..utils import gather_feat, gaussian_radius, gen_gaussian_target, get_local_maximum, get_topk_from_heatmap, multi_apply, transpose_and_gather_feat
  from .base_dense_head import BaseDenseHead
label_desc: Use image node_id 2 for calling the BiCornerPool obj's underlying member method code with example usage: obj.forward(x) and returns: conv2