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","."]
docstr: Forward function.
  
  Args:
      x (torch.Tensor): A Tensor of shape :math:`(N, HW, C)`.
  
  Returns:
      torch.Tensor: Tensor: A tensor of shape math:`(N, HW, C)`.
docstr_tok: ["Forward","function",".","Args",":","x","(","torch.Tensor",")",":","A","Tensor","of","shape",":","math",":","`","(","N",",","HW",",","C",")","`",".","Returns",":","torch.Tensor",":","Tensor",":","A","tensor","of","shape","math",":","`","(","N",",","HW",",","C",")","`","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Forward function.
  
      Args:
          x (torch.Tensor): A Tensor of shape :math:`(N, HW, C)`.
  
      Returns:
          torch.Tensor: Tensor: A tensor of shape math:`(N, HW, C)`.
      """
      h, w = self.input_shape
      x = x.permute(0, 2, 1).reshape([-1, self.embed_dims, h, w])
      x = self.local_mixer(x)
      x = x.flatten(2).permute(0, 2, 1)
      return x
  
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 2 for calling the ConvMixer obj's underlying member method code with example usage: obj.forward(x) and returns: x