          for side in ("a", "b"):
              batch = next(self._display_feeds["preview"][side])
              self._samples[side] = batch["samples"]
              self._target[side] = batch["targets"][-1]
              self._masks[side] = batch["masks"][0]
  
      def compile_sample(self, batch_size, samples=None, images=None, masks=None):
          """ Compile the preview samples for display.
  
          Parameters
 
</s> remove             side_inputs, side_targets = self._get_next(side)
            if self._model.config["penalized_mask_loss"]:
                side_targets = self._compile_masks(side_targets)
                if not self._model.config["learn_mask"]:  # Remove masks from the model targets
                    side_targets = side_targets[:-1]
 </s> add             batch = next(self._feeds[side])
            side_inputs = batch["feed"]
            side_targets = self._compile_mask_targets(batch["targets"],
                                                      batch["masks"],
                                                      batch.get("additional_masks", None))
            if self._model.config["learn_mask"]:
                side_targets = side_targets + [batch["masks"]] </s> remove             masks[side] = batch["masks"][0]
 </s> add             masks[side] = batch["masks"] </s> remove     def _get_next(self, side):
        """ Return the next batch from the :class:`lib.training_data.TrainingDataGenerator` for
        this feeder ready for feeding into the model.

        Returns
        -------
        model_inputs: list
            A list of :class:`numpy.ndarray` for feeding into the model
        model_targets: list
            A list of :class:`numpy.ndarray` for comparing the output of the model
        """
        logger.trace("Generating targets")
        batch = next(self._feeds[side])
        targets_use_mask = (self._model.config["learn_mask"]
                            or self._model.config["penalized_mask_loss"])
        model_targets = batch["targets"] + batch["masks"] if targets_use_mask else batch["targets"]
        return batch["feed"], model_targets

    @classmethod
    def _compile_masks(cls, targets):
        """ Compile the masks into the targets for penalized loss.
 </s> add     def _compile_mask_targets(self, targets, masks, additional_masks):
        """ Compile the masks into the targets for penalized loss and for targeted learning. </s> remove                                       for mask in masks])[..., None]
 </s> add                                       for mask in masks])
                if add_masks.ndim == 3:
                    add_masks = add_masks[..., None]
            self._masks[side] = batch["masks"]
          for side in ("a", "b"):
              batch = next(self._display_feeds["preview"][side])
              self._samples[side] = batch["samples"]
              self._target[side] = batch["targets"][-1]
            self._masks[side] = batch["masks"]
  
      def compile_sample(self, batch_size, samples=None, images=None, masks=None):
          """ Compile the preview samples for display.
  
          Parameters
keep keep keep keep replace keep keep keep keep keep
 Add Mouth and Eye Priority to Loss options (#1054)

* Priority Training for Mouth and Eyes - Tensorflow

* Use chosen loss function for area multipliers

* loss multipliers for AMD

* Fix mask multipliers for plaid and roll PenalizedMaskLoss into LossWrapper

* losses_tf: roll PenalizedMaskLoss into LossWrapper 
plugins/train/trainer/_base.py