class_docstr: Implement the basic Mask R-CNN losses and inference logic described in :paper:`Mask R-CNN`
class_docstr_tok: ["Implement","the","basic","Mask","R-CNN","losses","and","inference","logic","described","in",":","paper",":","`","Mask","R-CNN","`"]
docstr: NOTE: this interface is experimental.
  
  Args:
      loss_weight (float): multiplier of the loss
      vis_period (int): visualization period
docstr_tok: ["NOTE",":","this","interface","is","experimental",".","Args",":","loss_weight","(","float",")",":","multiplier","of","the","loss","vis_period","(","int",")",":","visualization","period"]
code: def __init__(self, *, loss_weight: float = 1.0, vis_period: int = 0):
      """
      NOTE: this interface is experimental.
  
      Args:
          loss_weight (float): multiplier of the loss
          vis_period (int): visualization period
      """
      super().__init__()
      self.vis_period = vis_period
      self.loss_weight = loss_weight
  
imports: from typing import List
  import fvcore.nn.weight_init
  import torch
  from torch import nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.layers import Conv2d, ConvTranspose2d, ShapeSpec, cat, get_norm
  from detectron2.layers.wrappers import move_device_like
  from detectron2.structures import Instances
  from detectron2.utils.events import get_event_storage
  from detectron2.utils.registry import Registry
label_desc: Use image node_id 1 to create a new BaseMaskRCNNHead object from inherited base classes: nn with example: obj = BaseMaskRCNNHead()