          return loss
  
      def get_next(self, do_preview):
          """ Return the next batch from the generator
              Items should come out as: (warped, target [, mask]) """
          batch = next(self.feed)
          if self.use_mask:
              batch = [[batch["feed"], batch["masks"]], batch["targets"] + [batch["masks"]]]
          else:
              batch = [batch["feed"], batch["targets"]]
 
</s> remove     def get_next(self, do_preview):
 </s> add     def get_next(self): </s> remove         if self.use_mask:
            batch = [[batch["feed"], batch["masks"]], batch["targets"] + [batch["masks"]]]
        else:
            batch = [batch["feed"], batch["targets"]]
        self.generate_preview(do_preview)
        return batch
 </s> add         targets_use_mask = self.model.training_opts["replicate_input_mask"]
        model_inputs = batch["feed"] + batch["masks"] if self.use_mask else batch["feed"]
        model_targets = batch["targets"] + batch["masks"] if targets_use_mask else batch["targets"]
        return model_inputs, model_targets </s> remove     def train_one_batch(self, do_preview):
 </s> add     def train_one_batch(self): </s> remove         batch = self.get_next(do_preview)
 </s> add         model_inputs, model_targets = self.get_next() </s> remove         images = [batch["targets"][self.model.largest_face_index]]
        if self.use_mask:
            images = images + [batch["masks"]]
        sample = self.compile_sample(batchsize, samples=batch["samples"], images=images)
 </s> add         images = batch["targets"][self.model.largest_face_index]
        masks = batch["masks"][0]
        sample = self.compile_sample(batchsize, 
                                     samples=batch["samples"],
                                     images=images,
                                     masks=masks)
            Items should come out as: (sample, warped, targets, [mask]) """
        logger.debug("Generating targets")
          return loss
  
      def get_next(self, do_preview):
          """ Return the next batch from the generator
            Items should come out as: (sample, warped, targets, [mask]) """
        logger.debug("Generating targets")
          batch = next(self.feed)
          if self.use_mask:
              batch = [[batch["feed"], batch["masks"]], batch["targets"] + [batch["masks"]]]
          else:
              batch = [batch["feed"], batch["targets"]]
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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