class_docstr: YOLACT segmentation head used in https://arxiv.org/abs/1904.02689.
  
  Apply a semantic segmentation loss on feature space using layers that are
  only evaluated during training to increase performance with no speed
  penalty.
  
  Args:
      in_channels (int): Number of channels in the input feature map.
      num_classes (int): Number of categories excluding the background
          category.
      loss_segm (dict): Config of semantic segmentation loss.
code: def __init__(
      self,
      num_classes,
      in_channels=256,
      loss_segm=dict(
          type="CrossEntropyLoss", use_sigmoid=True, loss_weight=1.0
      ),
  ):
      super(YOLACTSegmHead, self).__init__()
      self.in_channels = in_channels
      self.num_classes = num_classes
      self.loss_segm = build_loss(loss_segm)
      self._init_layers()
      self.fp16_enabled = False
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, xavier_init
  from mmcv.runner import force_fp32
  from mmdet.core import build_sampler, fast_nms, images_to_levels, multi_apply
  from ..builder import HEADS, build_loss
  from .anchor_head import AnchorHead
label_desc: Use image node_id 1 to create a new YOLACTSegmHead object from inherited base classes: nn with example: obj = YOLACTSegmHead(num_classes, in_channels, loss_segm)