          logger.debug("Setting training data")
          # Force number of preview images to between 2 and 16
          self.training_opts["training_size"] = self.state.training_size
          self.training_opts["no_logs"] = self.state.current_session["no_logs"]
          self.training_opts["mask_type"] = self.config.get("mask_type", None)
          self.training_opts["coverage_ratio"] = self.calculate_coverage_ratio()
          logger.debug("Set training data: %s", self.training_opts)
  
      def calculate_coverage_ratio(self):
          """ Coverage must be a ratio, leading to a cropped shape divisible by 2 """
 
</s> remove         alignments:         dict containing paths to alignments files for keys 'a' and 'b'
        preview_scaling:    How much to scale the preview out by
        training_size:      Size of the training images
        coverage_ratio:     Ratio of face to be cropped out for training
        mask_type:          Type of mask to use. See lib.model.masks for valid mask names.
                            Set to None for not used
        no_logs:            Disable tensorboard logging
        snapshot_interval:  Interval for saving model snapshots
        warp_to_landmarks:  Use random_warp_landmarks instead of random_warp
        augment_color:      Perform random shifting of L*a*b* colors
        no_flip:            Don't perform a random flip on the image
        pingpong:           Train each side seperately per save iteration rather than together
 </s> add         alignments:             dict containing paths to alignments files for keys 'a' and 'b'
        preview_scaling:        How much to scale the preview out by
        training_size:          Size of the training images
        coverage_ratio:         Ratio of face to be cropped out for training
        replicate_input_mask:   Replicate input masks with additional model dedicated layers
        no_logs:                Disable tensorboard logging
        snapshot_interval:      Interval for saving model snapshots
        warp_to_landmarks:      Use random_warp_landmarks instead of random_warp
        augment_color:          Perform random shifting of L*a*b* colors
        no_flip:                Don't perform a random flip on the image
        pingpong:               Train each side seperately per save iteration rather than together </s> remove     def compile_sample(self, batch_size, samples=None, images=None):
 </s> add     def compile_sample(self, batch_size, samples=None, images=None, masks=None): </s> remove         self.image = image[self.top: self.bottom,
 </s> add         self.face = image[self.top: self.bottom, </s> remove     def _set__mask_class(self):
        """ Returns the correct mask class from :mod:`lib`.model.masks` as defined in the
        :attr:`mask_type` parameter. """
        mask_type = self._training_opts.get("mask_type", None)
        if mask_type:
            logger.debug("Mask type: '%s'", mask_type)
            _mask_class = getattr(masks, mask_type)
        else:
            _mask_class = None
        logger.debug("Mask class: %s", _mask_class)
        return _mask_class

 </s> add  </s> remove         self.target = [batch["targets"][self.model.largest_face_index]]
        if self.use_mask:
            self.target += [batch["masks"]]
 </s> add         self.target = batch["targets"][self.model.largest_face_index]
        self.masks = batch["masks"][0]
          logger.debug("Setting training data")
          # Force number of preview images to between 2 and 16
          self.training_opts["training_size"] = self.state.training_size
          self.training_opts["no_logs"] = self.state.current_session["no_logs"]

          self.training_opts["coverage_ratio"] = self.calculate_coverage_ratio()
          logger.debug("Set training data: %s", self.training_opts)
  
      def calculate_coverage_ratio(self):
          """ Coverage must be a ratio, leading to a cropped shape divisible by 2 """
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
plugins/train/model/_base.py