  
      def prepare_batch(self, batch):
          """ Prepare a batch for prediction """
          batch = batch - self.average_img
          batch = batch.transpose(0, 3, 1, 2)
          return batch
  
      def finalize_predictions(self, bounding_boxes_scales):
          """ Detect faces """
          ret = list()
 
</s> remove         return inputs[0] / inputs[1]


class S3fd(KSession):
    """ Keras Network """
    def __init__(self, model_path, model_kwargs, allow_growth, exclude_gpus, confidence):
        logger.debug("Initializing: %s: (model_path: '%s', model_kwargs: %s, allow_growth: %s, "
                     "exclude_gpus: %s, confidence: %s)", self.__class__.__name__, model_path,
                     model_kwargs, allow_growth, exclude_gpus, confidence)
        super().__init__("S3FD",
                         model_path,
                         model_kwargs=model_kwargs,
                         allow_growth=allow_growth,
                         exclude_gpus=exclude_gpus)
        self.load_model()
        self.confidence = confidence
        self.average_img = np.array([104.0, 117.0, 123.0])
        logger.debug("Initialized: %s", self.__class__.__name__)

    def prepare_batch(self, batch):
        """ Prepare a batch for prediction """
 </s> add  </s> remove         """ Detect faces """
 </s> add         """ Process the output from the model to obtain faces

        Parameters
        ----------
        bounding_boxes_scales: list
            The output predictions from the S3FD model
        """ </s> remove         inputs: Input tensor, or list/tuple of input tensors.
            The input to the layer
        **kwargs: Additional keyword arguments.
            Required for parent class but unused
 </s> add         batch: class:`numpy.ndarray`
            The batch to be fed to the model
 </s> remove             bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=1)
 </s> add             bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=3)
  
      def prepare_batch(self, batch):
          """ Prepare a batch for prediction """
          batch = batch - self.average_img

          return batch
  
      def finalize_predictions(self, bounding_boxes_scales):
          """ Detect faces """
          ret = list()
keep keep keep keep replace keep keep keep keep keep
 extract: S3FD - Convert to re-enable CPU 
plugins/extract/detect/s3fd.py