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","."]
code: def __init__(
      self,
      in_channels: int,
      directions: List[int],
      feat_channels: int = 128,
      out_channels: int = 128,
      norm_cfg: ConfigType = dict(type="BN", requires_grad=True),
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(init_cfg)
      self.direction1_conv = ConvModule(
          in_channels, feat_channels, 3, padding=1, norm_cfg=norm_cfg
      )
      self.direction2_conv = ConvModule(
          in_channels, feat_channels, 3, padding=1, norm_cfg=norm_cfg
      )
  
      self.aftpool_conv = ConvModule(
          feat_channels,
          out_channels,
          3,
          padding=1,
          norm_cfg=norm_cfg,
          act_cfg=None,
      )
  
      self.conv1 = ConvModule(
          in_channels, out_channels, 1, norm_cfg=norm_cfg, act_cfg=None
      )
      self.conv2 = ConvModule(
          in_channels, out_channels, 3, padding=1, norm_cfg=norm_cfg
      )
  
      self.direction1_pool = CornerPool(directions[0])
      self.direction2_pool = CornerPool(directions[1])
      self.relu = nn.ReLU(inplace=True)
  
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 1 to create a new BiCornerPool object from inherited base classes: BaseModule with example: obj = BiCornerPool(in_channels, directions, feat_channels, out_channels, norm_cfg, init_cfg)