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 forward_features(self, x):
      x = self.patch_embed(x)
      x = self.pos_drop(x + self.pos_embed)
      cls_tokens = self.cls_token.expand(x.shape[0], -1, -1)
      x, cls_tokens = self.transformers((x, cls_tokens))
      cls_tokens = self.norm(cls_tokens)
      return cls_tokens
  
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 8 for calling the PoolingVisionTransformer obj's underlying member method code with example usage: obj.forward_features(x) and returns: cls_tokens