class_docstr: RepMLP Net
  
  Args:
      - in_channels (`int`):
          Number of input channels.
      - num_classes (`int`):
          Number of classes.
      - patch_size (`tuple`):
          Patch size in a tuple (h, w).
      - num_blocks (`tuple`):
          Block numbers used in all stages
      - channels (`int`):
          Numbers of output channels used in all stages.
      - hs (`tuple`):
          Image heights used in all stages.
      - ws (`tuple`):
          Image weights used in all stages.
      - sharesets_nums (`tuple`):
          Shareset_nums used in all stages.
      - reparam_conv_k (`tuple`):
          Numbers of conv layers.
      - globalperceptron_reduce (`int`):
          Number to reduce internal hidden channels.
      - use_checkpoint (`bool`):
          Whether to load checkpoint.
      - deploy (`bool`):
          Flag to control deploy parameters like bias.
  
  Example:
      >>> from towhee.models.repmlp import RepMLPNet
      >>> import torch
      >>>
      >>> data = torch.rand(1, 3, 1536, 1536)
      >>> model = RepMLPNet()
      >>> outs = model(data)
      >>> print(data.shape)
      torch.Size([1, 1000])
class_docstr_tok: ["RepMLP","Net","Args",":","-","in_channels","(","`","int","`",")",":","Number","of","input","channels",".","-","num_classes","(","`","int","`",")",":","Number","of","classes",".","-","patch_size","(","`","tuple","`",")",":","Patch","size","in","a","tuple","(","h",",","w",")",".","-","num_blocks","(","`","tuple","`",")",":","Block","numbers","used","in","all","stages","-","channels","(","`","int","`",")",":","Numbers","of","output","channels","used","in","all","stages",".","-","hs","(","`","tuple","`",")",":","Image","heights","used","in","all","stages",".","-","ws","(","`","tuple","`",")",":","Image","weights","used","in","all","stages",".","-","sharesets_nums","(","`","tuple","`",")",":","Shareset_nums","used","in","all","stages",".","-","reparam_conv_k","(","`","tuple","`",")",":","Numbers","of","conv","layers",".","-","globalperceptron_reduce","(","`","int","`",")",":","Number","to","reduce","internal","hidden","channels",".","-","use_checkpoint","(","`","bool","`",")",":","Whether","to","load","checkpoint",".","-","deploy","(","`","bool","`",")",":","Flag","to","control","deploy","parameters","like","bias",".","Example",":",">",">",">","from","towhee.models.repmlp","import","RepMLPNet",">",">",">","import","torch",">",">",">",">",">",">","data","=","torch.rand","(","1",",","3",",","1536",",","1536",")",">",">",">","model","=","RepMLPNet","(",")",">",">",">","outs","=","model","(","data",")",">",">",">","print","(","data.shape",")","torch.Size","(","[","1",",","1000","]",")"]
code: def forward(self, x):
      x = self.conv_embedding(x)
      for i, stage in enumerate(self.stages):
          for block in stage:
              if self.use_checkpoint:
                  x = torch_checkpoint.checkpoint(block, x)
              else:
                  x = block(x)
          if i < len(self.stages) - 1:
              embed = self.embeds[i]
              if self.use_checkpoint:
                  x = torch_checkpoint.checkpoint(embed, x)
              else:
                  x = embed(x)
      x = self.head_norm(x)
      x = nn.functional.adaptive_avg_pool2d(x, 1)
      x = x.view(x.size(0), -1)
      x = self.head(x)
      return x
  
file_path: towhee/towhee/models/repmlp/repmlp.py
imports: from torch import nn
  import torch.utils.checkpoint
  from towhee.models.layers.ffn import FFNBlock
  from towhee.models.layers.conv_bn_activation import Conv2dBNActivation
  from towhee.models.utils import create_model
  from .blocks import RepMLPBlock
  from .configs import get_configs
label_desc: Use image node_id 2 for calling the RepMLPNet obj's underlying member method code with example usage: obj.forward(x) and returns: x