class_docstr: The original article refers to refer to https://arxiv.org/pdf/2107.00782
  
  Args:
      inplanes (int): Input channels of feature.
      planes (int): Output channels of feature.
      kernel_size (int, optional): The kernel size of Conv2D. Default: 1
      stride (int, optional): The stride length of Conv2D. Default: 1
code: def __init__(self, inplanes, planes, kernel_size=1, stride=1):
      super().__init__()
      self.inplanes = inplanes
      self.inter_planes = planes // 2
      self.planes = planes
      self.kernel_size = kernel_size
      self.stride = stride
      self.padding = (kernel_size - 1) // 2
      self.conv_q_right = nn.Conv2D(
          self.inplanes,
          1,
          kernel_size=1,
          stride=stride,
          padding=0,
          bias_attr=False,
      )
      self.conv_v_right = nn.Conv2D(
          self.inplanes,
          self.inter_planes,
          kernel_size=1,
          stride=stride,
          padding=0,
          bias_attr=False,
      )
      self.conv_up = nn.Conv2D(
          self.inter_planes,
          self.planes,
          kernel_size=1,
          stride=1,
          padding=0,
          bias_attr=False,
      )
      self.softmax_right = nn.Softmax(axis=2)
      self.sigmoid = nn.Sigmoid()
      self.conv_q_left = nn.Conv2D(
          self.inplanes,
          self.inter_planes,
          kernel_size=1,
          stride=stride,
          padding=0,
          bias_attr=False,
      )
      self.avg_pool = nn.AdaptiveAvgPool2D(1)
      self.conv_v_left = nn.Conv2D(
          self.inplanes,
          self.inter_planes,
          kernel_size=1,
          stride=stride,
          padding=0,
          bias_attr=False,
      )
      self.softmax_left = nn.Softmax(axis=2)
  
      self.init_weight()
  
file_path: PaddleSeg/paddleseg/models/layers/polaried_self_attention.py
imports: import paddle
  import paddle.nn
  from paddleseg.cvlibs import param_init
label_desc: Use image node_id 1 to create a new PolarizedSelfAttentionModule object from inherited base classes: nn with example: obj = PolarizedSelfAttentionModule(inplanes, planes, kernel_size, stride)