class_docstr: Locality-aware feedforward layer in SATRN, see `SATRN.
  
  <https://arxiv.org/abs/1910.04396>`_
  
  Args:
      d_in (int): Dimension of the input features.
      d_hid (int): Hidden dimension of feedforward layers.
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to [dict(type='Xavier', layer='Conv2d'),
          dict(type='Constant', layer='BatchNorm2d', val=1, bias=0)].
code: def __init__(
      self,
      d_in: int,
      d_hid: int,
      init_cfg: Optional[Union[Dict, List[Dict]]] = [
          dict(type="Xavier", layer="Conv2d"),
          dict(type="Constant", layer="BatchNorm2d", val=1, bias=0),
      ],
  ) -> None:
      super().__init__(init_cfg=init_cfg)
      self.conv1 = ConvModule(
          d_in,
          d_hid,
          kernel_size=1,
          padding=0,
          bias=False,
          norm_cfg=dict(type="BN"),
          act_cfg=dict(type="ReLU"),
      )
  
      self.depthwise_conv = ConvModule(
          d_hid,
          d_hid,
          kernel_size=3,
          padding=1,
          bias=False,
          groups=d_hid,
          norm_cfg=dict(type="BN"),
          act_cfg=dict(type="ReLU"),
      )
  
      self.conv2 = ConvModule(
          d_hid,
          d_in,
          kernel_size=1,
          padding=0,
          bias=False,
          norm_cfg=dict(type="BN"),
          act_cfg=dict(type="ReLU"),
      )
  
imports: from typing import Dict, List, Optional, Union
  import numpy
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmocr.models.common import MultiHeadAttention
label_desc: Use image node_id 1 to create a new LocalityAwareFeedforward object from inherited base classes: BaseModule with example: obj = LocalityAwareFeedforward(d_in, d_hid, init_cfg)