class_docstr: Spatial Attention module in Real-Time Scene Text Detection with
  Differentiable Binarization and Adaptive Scale Fusion.
  
  This was partially adapted from https://github.com/MhLiao/DB
  
  Args:
      in_channels (int): A numbers of input channels.
      c_wise_channels (int): Number of channel-wise attention channels.
      out_channels (int): Number of output channels.
      init_cfg (dict or list[dict], optional): Initialization configs.
class_docstr_tok: ["Spatial","Attention","module","in","Real-Time","Scene","Text","Detection","with","Differentiable","Binarization","and","Adaptive","Scale","Fusion",".","This","was","partially","adapted","from","https",":","\/\/github.com\/MhLiao\/DB","Args",":","in_channels","(","int",")",":","A","numbers","of","input","channels",".","c_wise_channels","(","int",")",":","Number","of","channel-wise","attention","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","configs","."]
code: def __init__(
      self,
      in_channels: int,
      c_wise_channels: int,
      out_channels: int,
      init_cfg: Optional[Union[Dict, List[Dict]]] = [
          dict(type="Kaiming", layer="Conv", bias=0)
      ],
  ) -> None:
      super().__init__(init_cfg=init_cfg)
      self.avg_pool = nn.AdaptiveAvgPool2d(1)
      # Channel Wise
      self.channel_wise = Sequential(
          ConvModule(
              in_channels,
              c_wise_channels,
              1,
              bias=False,
              conv_cfg=None,
              norm_cfg=None,
              act_cfg=dict(type="ReLU"),
              inplace=False,
          ),
          ConvModule(
              c_wise_channels,
              in_channels,
              1,
              bias=False,
              conv_cfg=None,
              norm_cfg=None,
              act_cfg=dict(type="Sigmoid"),
              inplace=False,
          ),
      )
      # Spatial Wise
      self.spatial_wise = Sequential(
          ConvModule(
              1,
              1,
              3,
              padding=1,
              bias=False,
              conv_cfg=None,
              norm_cfg=None,
              act_cfg=dict(type="ReLU"),
              inplace=False,
          ),
          ConvModule(
              1,
              1,
              1,
              bias=False,
              conv_cfg=None,
              norm_cfg=None,
              act_cfg=dict(type="Sigmoid"),
              inplace=False,
          ),
      )
      # Attention Wise
      self.attention_wise = ConvModule(
          in_channels,
          out_channels,
          1,
          bias=False,
          conv_cfg=None,
          norm_cfg=None,
          act_cfg=dict(type="Sigmoid"),
          inplace=False,
      )
  
file_path: mmocr/mmocr/models/textdet/necks/fpn_cat.py
imports: from typing import Dict, List, Optional, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule
  from mmengine.model import BaseModule, ModuleList, Sequential
  from mmocr.registry import MODELS
label_desc: Use image node_id 1 to create a new ScaleChannelSpatialAttention object from inherited base classes: BaseModule with example: obj = ScaleChannelSpatialAttention(in_channels, c_wise_channels, out_channels, init_cfg)