          self.feed = generator.minibatch_ab(images, batch_size, self.side)
  
          self.preview_feed = None
          self.timelapse_feed = None
  
      def load_generator(self):
          """ Pass arguments to TrainingDataGenerator and return object """
          logger.debug("Loading generator: %s", self.side)
          input_size = self.model.input_shape[0]
 
</s> remove         self.mask = None
 </s> add         self.masks = None </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] </s> remove     def _launch_aligner(self):
        """ Launch the face aligner """
        logger.debug("Launching Aligner")
        kwargs = dict(in_queue=self._queues["extract_align_in"],
                      out_queue=self._queues["extract_align_out"])
        self._aligner.initialize(**kwargs)
        self._aligner.start()
        logger.debug("Launched Aligner")
 </s> add     @staticmethod
    def _load_masker(masker, configfile, input_size, output_size, coverage_ratio):
        """ Set global arguments and load masker plugin """
        masker_name = masker.replace("-", "_").lower()
        logger.debug("Loading Masker: '%s'", masker_name)
        masker = PluginLoader.get_masker(masker_name)(configfile=configfile,
                                                      input_size=input_size,
                                                      output_size=output_size,
                                                      coverage_ratio=coverage_ratio)
        return masker </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     def train_one_batch(self, do_preview):
 </s> add     def train_one_batch(self):
        self.set_preview_feed()
          self.feed = generator.minibatch_ab(images, batch_size, self.side)
  
          self.preview_feed = None
          self.timelapse_feed = None
        self.set_preview_feed()
  
      def load_generator(self):
          """ Pass arguments to TrainingDataGenerator and return object """
          logger.debug("Loading generator: %s", self.side)
          input_size = self.model.input_shape[0]
keep keep keep add keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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