class_docstr: YOLACT mask head used in https://arxiv.org/abs/1904.02689.
  
  This head outputs the mask prototypes for YOLACT.
  
  Args:
      in_channels (int): Number of channels in the input feature map.
      proto_channels (tuple[int]): Output channels of protonet convs.
      proto_kernel_sizes (tuple[int]): Kernel sizes of protonet convs.
      include_last_relu (Bool): If keep the last relu of protonet.
      num_protos (int): Number of prototypes.
      num_classes (int): Number of categories excluding the background
          category.
      loss_mask_weight (float): Reweight the mask loss by this factor.
      max_masks_to_train (int): Maximum number of masks to train for
          each image.
code: def __init__(
      self,
      num_classes,
      in_channels=256,
      proto_channels=(256, 256, 256, None, 256, 32),
      proto_kernel_sizes=(3, 3, 3, -2, 3, 1),
      include_last_relu=True,
      num_protos=32,
      loss_mask_weight=1.0,
      max_masks_to_train=100,
  ):
      super(YOLACTProtonet, self).__init__()
      self.in_channels = in_channels
      self.proto_channels = proto_channels
      self.proto_kernel_sizes = proto_kernel_sizes
      self.include_last_relu = include_last_relu
      self.protonet = self._init_layers()
  
      self.loss_mask_weight = loss_mask_weight
      self.num_protos = num_protos
      self.num_classes = num_classes
      self.max_masks_to_train = max_masks_to_train
      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 YOLACTProtonet object from inherited base classes: nn with example: obj = YOLACTProtonet(num_classes, in_channels, proto_channels, proto_kernel_sizes, include_last_relu, num_protos, loss_mask_weight, max_masks_to_train)