code: def __init__(
      self,
      in_channels,
      num_groups=4,
      dim=256,
      num_convs=4,
      num_masks=100,
      num_classes=80,
      kernel_dim=128,
      act_cfg=dict(type="ReLU", inplace=True),
  ):
      super().__init__()
      self.num_groups = num_groups
      self.num_classes = num_classes
  
      self.inst_convs = _make_stack_3x3_convs(
          num_convs, in_channels, dim, act_cfg=act_cfg
      )
      # iam prediction, a group conv
      expand_dim = dim * self.num_groups
      self.iam_conv = nn.Conv2d(
          dim,
          num_masks * self.num_groups,
          3,
          padding=1,
          groups=self.num_groups,
      )
      # outputs
      self.fc = nn.Linear(expand_dim, expand_dim)
  
      self.cls_score = nn.Linear(expand_dim, self.num_classes)
      self.mask_kernel = nn.Linear(expand_dim, kernel_dim)
      self.objectness = nn.Linear(expand_dim, 1)
  
      self.prior_prob = 0.01
      self._init_weights()
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from mmengine.model.weight_init import caffe2_xavier_init, kaiming_init
  from torch.nn import init
  from mmdet.registry import MODELS
label_desc: Use image node_id 1 to create a new GroupInstanceBranch object from inherited base classes: nn with example: obj = GroupInstanceBranch(in_channels, num_groups, dim, num_convs, num_masks, num_classes, kernel_dim, act_cfg)