class_docstr: Vision Transformer with support for patch or hybrid CNN input stage
      
class_docstr_tok: ["Vision","Transformer","with","support","for","patch","or","hybrid","CNN","input","stage"]
code: def get_num_layer(self, var_name=""):
      if var_name in ("cls_token", "mask_token", "pos_embed"):
          return 0
      elif var_name.startswith("patch_embed"):
          return 0
      elif var_name.startswith("rel_pos_bias"):
          return len(self.blocks) - 1
      elif var_name.startswith("blocks"):
          layer_id = int(var_name.split(".")[1])
          return layer_id + 1
      else:
          return len(self.blocks)
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from timm.models.layers import drop_path, to_2tuple, trunc_normal_
  from timm.models.registry import register_model
  from lavis.common.dist_utils import download_cached_file
label_desc: Use image node_id 9 for calling the VisionTransformer obj's underlying member method code with example usage: obj.get_num_layer(var_name) and returns: int, int, unknown, unknown, len