class_docstr: MetaFormer
  Args:
      layers (tuple[int]): number of blocks for the 4 stages
      embed_dims (tuple[int]): embedding dimension
      mlp_ratios (tuple[float]): mlp ratios
      token_mixers (tuple[nn.module]): token mixers of different stages
      norm_layer (nn.module): normalization layer
      act_layer (nn.module): activation layer
      num_classes (int): number of classes
      in_patch_size (int): patch embedding size
      in_stride (int): stride of patch embedding
      in_pad (int): padding
      down_patch_size (int): down sample path size
      add_pos_embs (bool): down sample path size
      drop_rate (float): drop rate
      drop_path_rate (float): drop path rate
      use_layer_scale (bool): use layer scale
      layer_scale_init_value (float): layer scale init value
class_docstr_tok: ["MetaFormer","Args",":","layers","(","tuple","[","int","]",")",":","number","of","blocks","for","the","4","stages","embed_dims","(","tuple","[","int","]",")",":","embedding","dimension","mlp_ratios","(","tuple","[","float","]",")",":","mlp","ratios","token_mixers","(","tuple","[","nn.module","]",")",":","token","mixers","of","different","stages","norm_layer","(","nn.module",")",":","normalization","layer","act_layer","(","nn.module",")",":","activation","layer","num_classes","(","int",")",":","number","of","classes","in_patch_size","(","int",")",":","patch","embedding","size","in_stride","(","int",")",":","stride","of","patch","embedding","in_pad","(","int",")",":","padding","down_patch_size","(","int",")",":","down","sample","path","size","add_pos_embs","(","bool",")",":","down","sample","path","size","drop_rate","(","float",")",":","drop","rate","drop_path_rate","(","float",")",":","drop","path","rate","use_layer_scale","(","bool",")",":","use","layer","scale","layer_scale_init_value","(","float",")",":","layer","scale","init","value"]
code: def reset_classifier(self, num_classes):
      self.num_classes = num_classes
      self.head = (
          nn.Linear(self.embed_dim, num_classes)
          if num_classes > 0
          else nn.Identity()
      )
  
imports: from torch import nn
  import torch
  from functools import partial
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.poolformer.groupnorm import GroupNorm
  from towhee.models.poolformer.layernormchannel import LayerNormChannel
  from towhee.models.poolformer.pooling import Pooling
  from towhee.models.metaformer.basicblocks import basic_blocks
  from towhee.models.poolformer.patchembed import PatchEmbed
  from towhee.models.metaformer.addpositionembed import AddPositionEmb
  from towhee.models.metaformer.attention import Attention
  from towhee.models.metaformer.spatialfc import SpatialFc
label_desc: Use image node_id 4 for calling the MetaFormer obj's underlying member method code with example usage: obj.reset_classifier(num_classes) without return types