class_docstr: Vision Transformer w/ Distillation Token and Head
  
  Distillation token & head support for `DeiT: Data-efficient Image Transformers`
      - https://arxiv.org/abs/2012.12877
code: def _pos_embed(self, x):
      if self.dynamic_img_size:
          B, H, W, C = x.shape
          pos_embed = resample_abs_pos_embed(
              self.pos_embed,
              (H, W),
              num_prefix_tokens=0
              if self.no_embed_class
              else self.num_prefix_tokens,
          )
          x = x.view(B, -1, C)
      else:
          pos_embed = self.pos_embed
      if self.no_embed_class:
          # deit-3, updated JAX (big vision)
          # position embedding does not overlap with class token, add then concat
          x = x + pos_embed
          x = torch.cat(
              (
                  self.cls_token.expand(x.shape[0], -1, -1),
                  self.dist_token.expand(x.shape[0], -1, -1),
                  x,
              ),
              dim=1,
          )
      else:
          # original timm, JAX, and deit vit impl
          # pos_embed has entry for class token, concat then add
          x = torch.cat(
              (
                  self.cls_token.expand(x.shape[0], -1, -1),
                  self.dist_token.expand(x.shape[0], -1, -1),
                  x,
              ),
              dim=1,
          )
          x = x + pos_embed
      return self.pos_drop(x)
  
imports: from functools import partial
  from typing import Sequence, Union
  import torch
  from torch import nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import resample_abs_pos_embed
  from timm.models.vision_transformer import VisionTransformer, trunc_normal_, checkpoint_filter_fn
  from ._builder import build_model_with_cfg
  from ._manipulate import checkpoint_seq
  from ._registry import generate_default_cfgs, register_model, register_model_deprecations
label_desc: Use image node_id 7 for calling the VisionTransformerDistilled obj's underlying member method code with example usage: obj._pos_embed(x) and returns: self