code: def __init__(
      self,
      dim,
      num_heads=6,
      n_points=4,
      norm_layer=partial(nn.LayerNorm, eps=1e-6),
      drop=0.0,
      drop_path=0.0,
      with_cffn=True,
      cffn_ratio=0.25,
      init_values=0.0,
      deform_ratio=1.0,
      extra_extractor=False,
      with_cp=False,
  ):
      super().__init__()
  
      self.injector = Injector(
          dim=dim,
          n_levels=3,
          num_heads=num_heads,
          init_values=init_values,
          n_points=n_points,
          norm_layer=norm_layer,
          deform_ratio=deform_ratio,
          with_cp=with_cp,
      )
      self.extractor = Extractor(
          dim=dim,
          n_levels=1,
          num_heads=num_heads,
          n_points=n_points,
          norm_layer=norm_layer,
          deform_ratio=deform_ratio,
          with_cffn=with_cffn,
          cffn_ratio=cffn_ratio,
          drop=drop,
          drop_path=drop_path,
          with_cp=with_cp,
      )
      if extra_extractor:
          self.extra_extractors = nn.Sequential(
              *[
                  Extractor(
                      dim=dim,
                      num_heads=num_heads,
                      n_points=n_points,
                      norm_layer=norm_layer,
                      with_cffn=with_cffn,
                      cffn_ratio=cffn_ratio,
                      deform_ratio=deform_ratio,
                      drop=drop,
                      drop_path=drop_path,
                      with_cp=with_cp,
                  )
                  for _ in range(2)
              ]
          )
      else:
          self.extra_extractors = None
  
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 InteractionBlockWithCls object from inherited base classes: nn with example: obj = InteractionBlockWithCls(dim, num_heads, n_points, norm_layer, drop, drop_path, with_cffn, cffn_ratio, init_values, deform_ratio, extra_extractor, with_cp)