code: def __init__(
      self,
      num_classes=21,
      share_location=True,
      clip=False,
      background_label_id=0,
      use_difficult=True,
      mining_type="MAX_NEGATIVE",
      loc_weight=1.0,
      neg_overlap=0.5,
      neg_pos_ratio=3.0,
      overlap_threshold=0.5,
      loc_loss_type="SMOOTH_L1",
      conf_loss_type="SOFTMAX",
      use_prior_for_matching=True,
      match_type="PER_PREDICTION",
      convolution=False,
      use_prior_for_nms=False,
      name=None,
  ):
      self.costfunc = (
          self  # this is needed for the progress bar callback
      )
      self.name = name
      # encode_variance_in_target is False
  
      # only implemented these types so far
      assert (
          mining_type == "MAX_NEGATIVE"
      ), "other methods not supported"
      assert share_location, "Non sharing not supported yet"
      assert loc_loss_type == "SMOOTH_L1"
      assert conf_loss_type == "SOFTMAX"
      assert use_prior_for_matching
      assert match_type == "PER_PREDICTION"
      assert not convolution
      assert not use_prior_for_nms
  
      self.overlap_threshold = overlap_threshold
      self.neg_overlap = neg_overlap
      self.neg_pos_ratio = neg_pos_ratio
  
      self.loc_weight = loc_weight
  
      self.use_prior_for_nms = use_prior_for_nms
      self.convolution = convolution
      self.use_prior_for_matching = use_prior_for_matching
      self.match_type = match_type
      self.loc_loss_type = loc_loss_type
      self.conf_loss_type = conf_loss_type
      self.mining_type = mining_type
  
      self.background_label_id = background_label_id
      self.use_difficult = use_difficult
      self.mining_type = mining_type
  
      self.share_location = share_location
  
      self.num_classes = num_classes
      self.num_ = self.be.bsz
      self.loc_classes = 1 if share_location else self.num_classes
  
      self.clip = clip
      self.loc_deltas_dev = None
      self.conf_deltas_dev = None
  
      self.loss = None
      self.y_conf_dev = None
      self.softmax_dev = Softmax(axis=1)
  
imports: from neon import NervanaObject
  import numpy
  from util import util
  from neon.transforms import Softmax
label_desc: Use image node_id 1 to create a new MBoxLoss object from inherited base classes: NervanaObject with example: obj = MBoxLoss(num_classes, share_location, clip, background_label_id, use_difficult, mining_type, loc_weight, neg_overlap, neg_pos_ratio, overlap_threshold, loc_loss_type, conf_loss_type, use_prior_for_matching, match_type, convolution, use_prior_for_nms, name)