class_docstr: The ViT-Adapter
      
code: def __init__(
      self,
      pretrain_size=224,
      num_heads=12,
      conv_inplane=64,
      n_points=4,
      deform_num_heads=6,
      init_values=0.0,
      interaction_indexes=None,
      with_cffn=True,
      cffn_ratio=0.25,
      deform_ratio=1.0,
      add_vit_feature=True,
      pretrained=None,
      use_extra_extractor=True,
      *args,
      **kwargs,
  ):
      super().__init__(
          num_heads=num_heads, pretrained=pretrained, *args, **kwargs
      )
  
      self.cls_token = None
      self.num_block = len(self.blocks)
      self.pretrain_size = (pretrain_size, pretrain_size)
      self.interaction_indexes = interaction_indexes
      self.add_vit_feature = add_vit_feature
      embed_dim = self.embed_dim
      self.feat_channels = [embed_dim] * 4
  
      self.level_embed = self.create_parameter(
          shape=(3, embed_dim),
          default_initializer=paddle.nn.initializer.Constant(value=0.0),
      )
      self.spm = SpatialPriorModule(
          inplanes=conv_inplane, embed_dim=embed_dim
      )
      self.interactions = nn.Sequential(
          *[
              InteractionBlock(
                  dim=embed_dim,
                  num_heads=deform_num_heads,
                  n_points=n_points,
                  init_values=init_values,
                  drop_path=self.drop_path_rate,
                  norm_layer=self.norm_layer,
                  with_cffn=with_cffn,
                  cffn_ratio=cffn_ratio,
                  deform_ratio=deform_ratio,
                  extra_extractor=(
                      (
                          True
                          if i == len(interaction_indexes) - 1
                          else False
                      )
                      and use_extra_extractor
                  ),
              )
              for i in range(len(interaction_indexes))
          ]
      )
      self.up = nn.Conv2DTranspose(embed_dim, embed_dim, 2, 2)
      self.norm1 = nn.SyncBatchNorm(embed_dim)
      self.norm2 = nn.SyncBatchNorm(embed_dim)
      self.norm3 = nn.SyncBatchNorm(embed_dim)
      self.norm4 = nn.SyncBatchNorm(embed_dim)
  
      self.up.apply(self._init_weights)
      self.spm.apply(self._init_weights)
      self.interactions.apply(self._init_weights)
      self.apply(self._init_deform_weights)
      normal_init(self.level_embed)
  
imports: import math
  from functools import partial
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils, logger
  from paddleseg.cvlibs.param_init import normal_init, trunc_normal_init, constant_init
  from paddleseg.models.backbones.transformer_utils import to_2tuple, DropPath
  from paddleseg.models.layers.vit_adapter_layers import SpatialPriorModule, InteractionBlock, deform_inputs
  from paddleseg.models.layers.ms_deformable_attention import MSDeformAttn
label_desc: Use image node_id 1 to create a new ViTAdapter object from inherited base classes: VisionTransformer with example: obj = ViTAdapter(pretrain_size, num_heads, conv_inplane, n_points, deform_num_heads, init_values, interaction_indexes, with_cffn, cffn_ratio, deform_ratio, add_vit_feature, pretrained, use_extra_extractor)