          # Don't reload an already aligned face:
          if self.aligned:
              logger.trace("Skipping alignment calculation for already aligned face")
          else:
              face = AlignerExtract().transform(
                  image,
                  self.aligned["matrix"],
                  size,
 
</s> remove         logger.trace("Loading aligned face: (size: %s, align_eyes: %s, dtype: %s)",
                     size, align_eyes, dtype)
        padding = int(size * self.extract_ratio) // 2
        self.aligned["size"] = size
        self.aligned["padding"] = padding
        self.aligned["align_eyes"] = align_eyes
        self.aligned["matrix"] = get_align_mat(self, size, align_eyes)
        if image is None:
            self.aligned["face"] = None
 </s> add         # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face") </s> remove             if self.task.command == "train":
                self.tk_vars["istraining"].set(False)
 </s> add  </s> remove         if not get_config().session.initialized and iterations > 0:
            # Don't initialize session until after the first iteration as state
            # file must exist first
            get_config().session.initialize_session(is_training=True)

 </s> add 
            logger.trace("Loading aligned face: (size: %s, align_eyes: %s, dtype: %s)",
                         size, align_eyes, dtype)
            padding = int(size * self.extract_ratio) // 2
            self.aligned["size"] = size
            self.aligned["padding"] = padding
            self.aligned["align_eyes"] = align_eyes
            self.aligned["matrix"] = get_align_mat(self, size, align_eyes)
            self.aligned["face"] = None
        if image is not None and self.aligned["face"] is None:
            logger.trace("Getting aligned face")
          # Don't reload an already aligned face:
          if self.aligned:
              logger.trace("Skipping alignment calculation for already aligned face")
          else:
            logger.trace("Loading aligned face: (size: %s, align_eyes: %s, dtype: %s)",
                         size, align_eyes, dtype)
            padding = int(size * self.extract_ratio) // 2
            self.aligned["size"] = size
            self.aligned["padding"] = padding
            self.aligned["align_eyes"] = align_eyes
            self.aligned["matrix"] = get_align_mat(self, size, align_eyes)
            self.aligned["face"] = None
        if image is not None and self.aligned["face"] is None:
            logger.trace("Getting aligned face")
              face = AlignerExtract().transform(
                  image,
                  self.aligned["matrix"],
                  size,
keep keep keep add keep keep keep keep
 Bugfixes

- Fix filter/nfilter for convert
- Remove existing snapshot folder before creating if it pre-exists
- Don't initialize training session until after first save. "Nonetype" session fix 
lib/faces_detect.py