class_docstr: The Extractor module in ViT-Adapter.
code: def __init__(
      self,
      dim,
      num_heads=6,
      n_points=4,
      n_levels=1,
      deform_ratio=1.0,
      with_cffn=True,
      cffn_ratio=0.25,
      drop=0.0,
      drop_path=0.0,
      norm_layer=partial(nn.LayerNorm, epsilon=1e-6),
  ):
      super().__init__()
      self.query_norm = norm_layer(dim)
      self.feat_norm = norm_layer(dim)
      self.attn = MSDeformAttn(
          d_model=dim,
          n_levels=n_levels,
          n_heads=num_heads,
          n_points=n_points,
          ratio=deform_ratio,
      )
      self.with_cffn = with_cffn
      if with_cffn:
          self.ffn = ConvFFN(
              in_features=dim,
              hidden_features=int(dim * cffn_ratio),
              drop=drop,
          )
          self.ffn_norm = norm_layer(dim)
          self.drop_path = (
              DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
          )
  
imports: import math
  import warnings
  from functools import partial
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.models.backbones.transformer_utils import DropPath
  from paddleseg.models.layers.ms_deformable_attention import MSDeformAttn
label_desc: Use image node_id 1 to create a new Extractor object from inherited base classes: nn with example: obj = Extractor(dim, num_heads, n_points, n_levels, deform_ratio, with_cffn, cffn_ratio, drop, drop_path, norm_layer)