code: def fprop(self, inputs, inference=True):
      # assumes the inputs are a tuple of (outputs, prior_boxes),
      # where outputs is a vector of outputs from the model.
  
      # flatten the nested vector generated by tree-in-tree
      # also reorder the list in: 4_3, fc7, conv6, conv7, conv8, conv9
      # x = self.reorder(inputs[0])
      self.loc = inputs[0][0]
      self.conf = inputs[0][1]
      prior_boxes = inputs[1]
  
      # reshape loc from (HWC, N) to (HWK, 4, N)
      # reshape conf from (HWC, N) to (HWK, 21, N)
      conf_view = self.conf.reshape((-1, self.num_classes, self.be.bsz))
      loc_view = self.loc.reshape((-1, 4, self.be.bsz))
  
      # for mkl backend optimization
      if self.be.is_mkl():
          return self.be.detectionOutput_fprop(
              conf_view,
              loc_view,
              self.detections,
              prior_boxes,
              self.proposals,
              self.nms_topk,
              self.topk,
              self.threshold,
              self.nms_threshold,
          )
  
      # convert the prior boxes to bbox predictions by applying
      # the loc regression targets
      # process each image individually
  
      batch_all_detections = [None] * self.be.bsz
      for k in range(self.be.bsz):
          self.bbox_transform_inv(
              prior_boxes, loc_view[:, :, k], self.proposals
          )
  
          all_detections = np.zeros((0, 6))  # detections for this image
  
          conf = conf_view[:, :, k]
          self.scores[:] = self.softmax(conf)
  
          for c in range(self.num_classes):
              if c == 0:  # skip processing of background classes
                  continue
  
              # apply softmax
              scores = self.scores[:, c]
  
              # 1. apply threshold, sort, and get the top nms_k
              top_N_ind = self.get_top_N_index(
                  scores, self.nms_topk, self.threshold
              )
  
              # fill the detections
              if len(top_N_ind) > 0:
                  self.detections.fill(0)
                  self.detections[
                      : len(top_N_ind), :4
                  ] = self.proposals[top_N_ind, :]
                  self.detections[: len(top_N_ind), 4] = scores[
                      top_N_ind
                  ]
  
                  # 2. apply NMS
                  keep = self.be.nms(
                      self.detections,
                      self.nms_threshold,
                      normalized=True,
                  )
                  keep = keep[: self.nms_topk]
  
                  # 3. store the detections per class
                  # add an additional dimension for the category label
                  dets = np.append(
                      self.detections[keep, :].get(),
                      c * np.ones((len(keep), 1)),
                      axis=1,
                  )
                  all_detections = np.vstack([all_detections, dets])
  
          if all_detections.shape[0] > self.topk:
              top_N_ind = self.get_top_N_index(
                  all_detections[:, 4], self.topk, None
              )
              all_detections = all_detections[top_N_ind, :]
  
          batch_all_detections[k] = all_detections
  
      return batch_all_detections
  
imports: from neon.layers.layer import Layer, ParameterLayer
  import numpy
  from neon.transforms import Softmax
  from neon.initializers.initializer import Constant
  import math
  from collections import OrderedDict
label_desc: Use image node_id 4 for calling the DetectionOutput obj's underlying member method code with example usage: obj.fprop(inputs, inference) and returns: batch_all_detections, self