class_docstr: Pooling-based Vision Transformer
  
  A PyTorch implement of 'Rethinking Spatial Dimensions of Vision Transformers'
      - https://arxiv.org/abs/2103.16302
class_docstr_tok: ["Pooling-based","Vision","Transformer","A","PyTorch","implement","of","'Rethinking","Spatial","Dimensions","of","Vision","Transformers'","-","https",":","\/\/arxiv.org\/abs\/2103.16302"]
code: def reset_classifier(self, num_classes, global_pool=None):
      self.num_classes = num_classes
      self.head = (
          nn.Linear(self.embed_dim, num_classes)
          if num_classes > 0
          else nn.Identity()
      )
      if self.head_dist is not None:
          self.head_dist = (
              nn.Linear(self.embed_dim, self.num_classes)
              if num_classes > 0
              else nn.Identity()
          )
  
imports: import math
  import re
  from functools import partial
  from typing import Sequence, Tuple
  import torch
  from torch import nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import trunc_normal_, to_2tuple, LayerNorm
  from ._builder import build_model_with_cfg
  from ._registry import register_model, generate_default_cfgs
  from .vision_transformer import Block
label_desc: Use image node_id 7 for calling the PoolingVisionTransformer obj's underlying member method code with example usage: obj.reset_classifier(num_classes, global_pool) without return types