              batch = next(self._display_feeds["timelapse"][side])
              batchsizes.append(len(batch["samples"]))
              samples[side] = batch["samples"]
              images[side] = batch["targets"][-1]
              masks[side] = batch["masks"][0]
          batchsize = min(batchsizes)
          sample = self.compile_sample(batchsize, samples=samples, images=images, masks=masks)
          return sample
  
      def set_timelapse_feed(self, images, batch_size):
 
</s> remove             self._masks[side] = batch["masks"][0]
 </s> add             self._masks[side] = batch["masks"] </s> remove class TrainingDataGenerator():
 </s> add class TrainingDataGenerator():  # pylint:disable=too-few-public-methods </s> remove         logger.trace("masks shape: %s", masks.shape)
        batch = np.concatenate((batch, masks), axis=-1)
 </s> add         Returns
        -------
        :class:`numpy.ndarray`
            The batch with masks applied to the final channels
        """
        logger.trace("Input batch shape: %s, side: %s", batch.shape, side)
        size = batch.shape[1]
        for key in ("masks", "eyes", "mouths"):
            item = self._masks[key]
            if item is None and key != "masks":
                continue
            if item is None and key == "masks":
                logger.trace("Creating dummy masks. side: %s", side)
                masks = np.ones_like(batch[..., :1], dtype=batch.dtype)
            else:
                logger.trace("Obtaining masks for batch. (key: %s side: %s)", key, side)
                masks = np.array([self._get_mask(item[side][filename], size)
                                  for filename, face in zip(filenames, batch)], dtype=batch.dtype)
                masks = self._resize_masks(size, masks)

            logger.trace("masks: (key: %s, shape: %s)", key, masks.shape)
            batch = np.concatenate((batch, masks), axis=-1) </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                                       for mask in masks])[..., None]
 </s> add                                       for mask in masks])
                if add_masks.ndim == 3:
                    add_masks = add_masks[..., None]
            masks[side] = batch["masks"]
              batch = next(self._display_feeds["timelapse"][side])
              batchsizes.append(len(batch["samples"]))
              samples[side] = batch["samples"]
              images[side] = batch["targets"][-1]
            masks[side] = batch["masks"]
          batchsize = min(batchsizes)
          sample = self.compile_sample(batchsize, samples=samples, images=images, masks=masks)
          return sample
  
      def set_timelapse_feed(self, images, batch_size):
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