code: def __init__(
      self,
      dim,
      num_heads=6,
      n_points=4,
      n_levels=1,
      deform_ratio=1.0,
      norm_layer=partial(nn.LayerNorm, eps=1e-6),
      init_values=0.0,
      with_cp=False,
  ):
      super().__init__()
      self.with_cp = with_cp
      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.gamma = nn.Parameter(
          init_values * torch.ones((dim)), requires_grad=True
      )
  
imports: from functools import partial
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from ...ops.modules import MSDeformAttn
  from .drop_path import DropPath
label_desc: Use image node_id 1 to create a new Injector object from inherited base classes: nn with example: obj = Injector(dim, num_heads, n_points, n_levels, deform_ratio, norm_layer, init_values, with_cp)