code: def on_epoch_end(self, callback_data, model, epoch):
      all_boxes = []
      all_gt_boxes = []
      logger.info("Calculating Mean AP on eval set")
      self.eval_set.reset()
      (all_boxes, all_gt_boxes) = get_boxes(model, self.eval_set)
  
      MAP = voc_eval(
          all_boxes,
          all_gt_boxes,
          self.eval_set.CLASSES,
          use_07_metric=True,
          verbose=False,
      )
      logger.info(
          "AP scores: %s"
          % " ".join(
              [ky + ":" + "%.2f" % val for ky, val in MAP.items()]
          )
      )
      logger.info("Mean AP: %.2f" % np.mean([MAP[ky] for ky in MAP]))
  
file_path: neon/examples/ssd/callbacks.py
imports: import numpy
  from neon.callbacks.callbacks import Callback
  from neon import logger
  from inference import get_boxes
  from util.voc_eval import voc_eval
  from util.util import plot_image
  import os
label_desc: Use image node_id 2 for calling the MAP_Callback obj's underlying member method code with example usage: obj.on_epoch_end(callback_data, model, epoch) without return types