class_docstr: The conv Mixer.
  
  Args:
      embed_dims (int): Number of character components.
      num_heads (int, optional): Number of heads. Defaults to 8.
      input_shape (Tuple[int, int], optional): The shape of input [H, W].
          Defaults to [8, 25].
      local_k (Tuple[int, int], optional): Window size. Defaults to [3, 3].
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to None.
class_docstr_tok: ["The","conv","Mixer",".","Args",":","embed_dims","(","int",")",":","Number","of","character","components",".","num_heads","(","int",",","optional",")",":","Number","of","heads",".","Defaults","to","8.","input_shape","(","Tuple","[","int",",","int","]",",","optional",")",":","The","shape","of","input","[","H",",","W","]",".","Defaults","to","[","8",",","25","]",".","local_k","(","Tuple","[","int",",","int","]",",","optional",")",":","Window","size",".","Defaults","to","[","3",",","3","]",".","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","configs",".","Defaults","to","None","."]
code: def __init__(
      self,
      embed_dims: int,
      num_heads: int = 8,
      input_shape: Tuple[int, int] = [8, 25],
      local_k: Tuple[int, int] = [3, 3],
      init_cfg: Optional[Union[Dict, List[Dict]]] = None,
  ):
      super().__init__(init_cfg)
      self.input_shape = input_shape
      self.embed_dims = embed_dims
      self.local_mixer = nn.Conv2d(
          in_channels=embed_dims,
          out_channels=embed_dims,
          kernel_size=local_k,
          stride=1,
          padding=(local_k[0] // 2, local_k[1] // 2),
          groups=num_heads,
      )
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule
  from mmcv.cnn.bricks import DropPath
  from mmengine.model import BaseModule
  from mmengine.model.weight_init import trunc_normal_init
  from mmocr.registry import MODELS
  from mmocr.structures import TextRecogDataSample
label_desc: Use image node_id 1 to create a new ConvMixer object from inherited base classes: BaseModule with example: obj = ConvMixer(embed_dims, num_heads, input_shape, local_k, init_cfg)