class_docstr: MetaNeXt
      A PyTorch impl of : `InceptionNeXt: When Inception Meets ConvNeXt` - https://arxiv.org/abs/2303.16900
  
  Args:
      in_chans (int): Number of input image channels. Default: 3
      num_classes (int): Number of classes for classification head. Default: 1000
      depths (tuple(int)): Number of blocks at each stage. Default: (3, 3, 9, 3)
      dims (tuple(int)): Feature dimension at each stage. Default: (96, 192, 384, 768)
      token_mixers: Token mixer function. Default: nn.Identity
      norm_layer: Normalization layer. Default: nn.BatchNorm2d
      act_layer: Activation function for MLP. Default: nn.GELU
      mlp_ratios (int or tuple(int)): MLP ratios. Default: (4, 4, 4, 3)
      head_fn: classifier head
      drop_rate (float): Head dropout rate
      drop_path_rate (float): Stochastic depth rate. Default: 0.
      ls_init_value (float): Init value for Layer Scale. Default: 1e-6.
class_docstr_tok: ["MetaNeXt","A","PyTorch","impl","of",":","`","InceptionNeXt",":","When","Inception","Meets","ConvNeXt","`","-","https",":","\/\/arxiv.org\/abs\/2303.16900","Args",":","in_chans","(","int",")",":","Number","of","input","image","channels",".","Default",":","3","num_classes","(","int",")",":","Number","of","classes","for","classification","head",".","Default",":","1000","depths","(","tuple","(","int",")",")",":","Number","of","blocks","at","each","stage",".","Default",":","(","3",",","3",",","9",",","3",")","dims","(","tuple","(","int",")",")",":","Feature","dimension","at","each","stage",".","Default",":","(","96",",","192",",","384",",","768",")","token_mixers",":","Token","mixer","function",".","Default",":","nn.Identity","norm_layer",":","Normalization","layer",".","Default",":","nn.BatchNorm2d","act_layer",":","Activation","function","for","MLP",".","Default",":","nn.GELU","mlp_ratios","(","int","or","tuple","(","int",")",")",":","MLP","ratios",".","Default",":","(","4",",","4",",","4",",","3",")","head_fn",":","classifier","head","drop_rate","(","float",")",":","Head","dropout","rate","drop_path_rate","(","float",")",":","Stochastic","depth","rate",".","Default",":","0.","ls_init_value","(","float",")",":","Init","value","for","Layer","Scale",".","Default",":","1e-6","."]
code: def reset_classifier(
      self, num_classes=0, global_pool=None, head_fn=MlpClassifierHead
  ):
      if global_pool is not None:
          self.global_pool = global_pool
      if num_classes > 0:
          if issubclass(head_fn, MlpClassifierHead):
              assert (
                  self.global_pool
              ), "Cannot disable global pooling with MLP head present."
          self.head = head_fn(
              self.num_features,
              num_classes,
              pool_type=self.global_pool,
              drop=self.drop_rate,
          )
      else:
          if self.global_pool:
              self.head = SelectAdaptivePool2d(
                  pool_type=self.global_pool, flatten=True
              )
          else:
              self.head = nn.Identity()
  
imports: from functools import partial
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import trunc_normal_, DropPath, to_2tuple, get_padding, SelectAdaptivePool2d
  from ._builder import build_model_with_cfg
  from ._manipulate import checkpoint_seq
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 5 for calling the MetaNeXt obj's underlying member method code with example usage: obj.reset_classifier(num_classes, global_pool, head_fn) without return types