class_docstr: Reparameterizable token mixer
  
  For more details, please refer to our paper:
  `FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization`
  
  Args:
      opts: Command line arguments.
      dim: Input feature map dimension. :math:`C_{in}` from an expected input of size :math:`(B, C_{in}, H, W)`.
      kernel_size: Kernel size for spatial mixing. Default: 3
      use_layer_scale: If True, learnable layer scale is used. Default: ``True``
      layer_scale_init_value: Initial value for layer scale. Default: 1e-5
      inference_mode: If True, instantiates model in inference mode. Default: ``False``
class_docstr_tok: ["Reparameterizable","token","mixer","For","more","details",",","please","refer","to","our","paper",":","`","FastViT",":","A","Fast","Hybrid","Vision","Transformer","using","Structural","Reparameterization","`","Args",":","opts",":","Command","line","arguments",".","dim",":","Input","feature","map","dimension",".",":","math",":","`","C_","{","in","}","`","from","an","expected","input","of","size",":","math",":","`","(","B",",","C_","{","in","}",",","H",",","W",")","`",".","kernel_size",":","Kernel","size","for","spatial","mixing",".","Default",":","3","use_layer_scale",":","If","True",",","learnable","layer","scale","is","used",".","Default",":","``","True","``","layer_scale_init_value",":","Initial","value","for","layer","scale",".","Default",":","1e-5","inference_mode",":","If","True",",","instantiates","model","in","inference","mode",".","Default",":","``","False","``"]
docstr: Reparameterize mixer and norm into a single
  convolutional layer for efficient inference.
docstr_tok: ["Reparameterize","mixer","and","norm","into","a","single","convolutional","layer","for","efficient","inference","."]
code: def reparameterize(self) -> None:
      """
      Reparameterize mixer and norm into a single
      convolutional layer for efficient inference.
      """
      self.mixer.reparameterize()
      self.norm.reparameterize()
  
      if self.use_layer_scale:
          w = self.mixer.id_tensor + self.layer_scale.unsqueeze(-1) * (
              self.mixer.reparam_conv.weight
              - self.norm.reparam_conv.weight
          )
          b = torch.squeeze(self.layer_scale) * (
              self.mixer.reparam_conv.bias - self.norm.reparam_conv.bias
          )
      else:
          w = (
              self.mixer.id_tensor
              + self.mixer.reparam_conv.weight
              - self.norm.reparam_conv.weight
          )
          b = self.mixer.reparam_conv.bias - self.norm.reparam_conv.bias
  
      self.reparam_conv = nn.Conv2d(
          in_channels=self.dim,
          out_channels=self.dim,
          kernel_size=self.kernel_size,
          stride=1,
          padding=self.kernel_size // 2,
          groups=self.dim,
          bias=True,
      )
      self.reparam_conv.weight.data = w
      self.reparam_conv.bias.data = b
  
      for para in self.parameters():
          para.detach_()
      self.__delattr__("mixer")
      self.__delattr__("norm")
  
imports: import argparse
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  from cvnets.layers import ConvLayer2d, MultiHeadAttention, StochasticDepth
  from cvnets.layers.normalization.batch_norm import BatchNorm2d
  from cvnets.modules import BaseModule
  from cvnets.modules.mobileone_block import MobileOneBlock, RepLKBlock
label_desc: Use image node_id 3 for calling the RepMixer obj's underlying member method code with example usage: obj.reparameterize() without return types