          return predicted
  
      def queue_out_frames(self, batch, swapped_faces):
          """ Compile the batch back to original frames and put to out_queue """
          logger.trace("Queueing out batch. Batchsize: %s", len(batch))
          pointer = 0
          for item in batch:
              num_faces = len(item["detected_faces"])
 
</s> remove             batch = self.compile_mask(batch)
 </s> add             # Add mask to inputs
            mask = batch[-1]
            batch = [[feed, mask], batch] </s> remove     def compile_mask(self, batch):
        """ Compile the mask into training data """
        logger.trace("Compiling Mask: (side: '%s')", self.side)
        mask = batch[-1]
        retval = list()
        for idx in range(len(batch) - 1):
            image = batch[idx]
            retval.append([image, mask])
        return retval

 </s> add  </s> remove         return tuple(out[0])
 </s> add         return [tuple(shape) for shape in out]

    @property
    def output_shape(self):
        """ The output shape of the model (shape of largest face output) """
        return self.output_shapes[self.largest_face_index]

    @property
    def largest_face_index(self):
        """ Return the index from model.outputs of the largest face
            Required for multi-output model prediction. The largest face
            is assumed to be the final output
        """
        sizes = [shape[1] for shape in self.output_shapes if shape[2] == 3]
        if not sizes:
            return None
        max_face = max(sizes)
        retval = [idx for idx, shape in enumerate(self.output_shapes)
                  if shape[1] == max_face and shape[2] == 3][0]
        logger.debug(retval)
        return retval

    @property
    def largest_mask_index(self):
        """ Return the index from model.outputs of the largest mask
            Required for multi-output model prediction. The largest face
            is assumed to be the final output
        """
        sizes = [shape[1] for shape in self.output_shapes if shape[2] == 1]
        if not sizes:
            return None
        max_mask = max(sizes)
        retval = [idx for idx, shape in enumerate(self.output_shapes)
                  if shape[1] == max_mask and shape[2] == 1][0]
        logger.debug(retval)
        return retval </s> remove         batch = batch[1:]   # Remove full size samples from batch
 </s> add         feed = batch[1]
        batch = batch[2:]   # Remove full size samples and feed from batch
    def filter_multi_out(self, predicted):
        """ Filter the predicted output to the final output """
        if not predicted:
            return predicted
        face = predicted[self.output_indices["face"]]
        mask_idx = self.output_indices["mask"]
        mask = predicted[mask_idx] if mask_idx is not None else None
        predicted = [face, mask] if mask is not None else [face]
        logger.trace("Filtered output shape(s): %s", [predict.shape for predict in predicted])
        return predicted

          return predicted
  
    def filter_multi_out(self, predicted):
        """ Filter the predicted output to the final output """
        if not predicted:
            return predicted
        face = predicted[self.output_indices["face"]]
        mask_idx = self.output_indices["mask"]
        mask = predicted[mask_idx] if mask_idx is not None else None
        predicted = [face, mask] if mask is not None else [face]
        logger.trace("Filtered output shape(s): %s", [predict.shape for predict in predicted])
        return predicted

      def queue_out_frames(self, batch, swapped_faces):
          """ Compile the batch back to original frames and put to out_queue """
          logger.trace("Queueing out batch. Batchsize: %s", len(batch))
          pointer = 0
          for item in batch:
              num_faces = len(item["detected_faces"])
keep add keep keep keep keep keep keep
 Training: Add Multi-Output Support

- Name output nodes of models
- Add support for multiple outputs in models and in training
- Update loss output format for cli and gui
- Sort graphs tabs on training
- Fix analysis graph for new loss names
- Multi output support in convert 
scripts/convert.py