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.
docstr: Forward feature from the upstream network.
  
  Args:
      x (Tensor): Feature from the upstream network, which is
          a 4D-tensor.
  
  Returns:
      Tensor: Predicted semantic segmentation map with shape
          (N, num_classes, H, W).
docstr_tok: ["Forward","feature","from","the","upstream","network",".","Args",":","x","(","Tensor",")",":","Feature","from","the","upstream","network",",","which","is","a","4D-tensor",".","Returns",":","Tensor",":","Predicted","semantic","segmentation","map","with","shape","(","N",",","num_classes",",","H",",","W",")","."]
code: def forward(self, x):
      """Forward feature from the upstream network.
  
      Args:
          x (Tensor): Feature from the upstream network, which is
              a 4D-tensor.
  
      Returns:
          Tensor: Predicted semantic segmentation map with shape
              (N, num_classes, H, W).
      """
      return self.segm_conv(x)
  
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 4 for calling the YOLACTSegmHead obj's underlying member method code with example usage: obj.forward(x) and returns: self