          self.images = images
          self.config = config
          self.target = None
          self.samples = None
          self.mask = None
  
          generator = self.load_generator()
          self.feed = generator.minibatch_ab(images, batch_size, self.side)
  
          self.preview_feed = None
 
</s> remove         if self.preview_feed is None:
            self.set_preview_feed()
 </s> add  </s> remove         retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
 </s> add         masks = masks if masks is not None else self.masks
        samples = samples if samples is not None else self.samples
        retval = [samples[0:num_images], images[0:num_images], masks[0:num_images]] </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):
        self.masks = None
          self.images = images
          self.config = config
          self.target = None
          self.samples = None
        self.masks = None
  
          generator = self.load_generator()
          self.feed = generator.minibatch_ab(images, batch_size, self.side)
  
          self.preview_feed = None
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