code: def EncodeConfPrediction(
      self, num_conf, y_conf, all_matches, all_neg_inds, all_gt_boxes
  ):
      conf_gt = (
          np.zeros((num_conf,), dtype=np.int) + self.background_label_id
      )
      conf_pred = np.zeros((num_conf, self.num_classes))
  
      num_priors = y_conf.shape[1]
  
      count = 0
      for batch in range(self.be.bsz):
          gt_boxes = all_gt_boxes[batch]
          if len(gt_boxes) == 0:
              # no GT labels for this image
              continue
  
          matches = all_matches[batch]
          match_inds = matches["inds"]
          assert len(match_inds) == num_priors
  
          positive_inds = np.where(match_inds > -1)[0]
          negative_inds = all_neg_inds[batch]
  
          n_pos = len(positive_inds)
          n_neg = len(negative_inds)
  
          # store positive matches
          conf_pred[count : (count + n_pos), :] = y_conf[
              batch, positive_inds, :
          ]
          conf_gt[count : (count + n_pos)] = gt_boxes[
              match_inds[positive_inds], 4
          ]
          count += n_pos
  
          # pad with negative matches
          conf_pred[count : (count + n_neg), :] = y_conf[
              batch, negative_inds, :
          ]
          conf_gt[count : (count + n_neg)] = self.background_label_id
          count += n_neg
  
      return (conf_gt, conf_pred)
  
imports: from neon import NervanaObject
  import numpy
  from util import util
  from neon.transforms import Softmax
label_desc: Use image node_id 5 for calling the MBoxLoss obj's underlying member method code with example usage: obj.EncodeConfPrediction(num_conf, y_conf, all_matches, all_neg_inds, all_gt_boxes) and returns: conf_gt,  conf_pred