          self.mask = None
  
          generator = self.load_generator()
          self.feed = generator.minibatch_ab(images, batch_size, self.side)
          self.shutdown_feed = generator.join_subprocess
  
          self.preview_feed = None
          self.timelapse_feed = None
  
      def load_generator(self):
 
</s> remove         self.fixed_producer_dispatcher = None  # Set by FPD when loading
        self._nearest_landmarks = None
 </s> add         self._nearest_landmarks = {} </s> remove             if next_item is None:
 </s> add             self.check_and_raise_error()
            if next_item is None or next_item == "EOF":
                logger.debug("Got EOF OR NONE in BackgroundGenerator") </s> remove         self.daemon = True
 </s> add         self._gen_args = args or tuple()
        self._gen_kwargs = kwargs or dict() </s> remove     def __init__(self, generator, prefetch=1):
        threading.Thread.__init__(self)
        self.queue = Queue.Queue(maxsize=prefetch)
 </s> add     def __init__(self, generator, prefetch=1, thread_count=2,
                 queue=None, args=None, kwargs=None):
        super().__init__(target=self._run, thread_count=thread_count)
        self.queue = queue or Queue.Queue(prefetch)
          self.mask = None
  
          generator = self.load_generator()
          self.feed = generator.minibatch_ab(images, batch_size, self.side)

  
          self.preview_feed = None
          self.timelapse_feed = None
  
      def load_generator(self):
keep keep keep keep replace keep keep keep keep keep
 de-MultiProcess Training

* Replaced multiprocessing in training_data with threading
* Fix cpu affinity issue
* Using multiple threads for BackgroundGenerator 
plugins/train/trainer/_base.py