          logger.debug("Setting training data")
          # Force number of preview images to between 2 and 16
          self.training_opts["training_size"] = self.state.training_size
          self.training_opts["no_logs"] = self.state.current_session["no_logs"]
          self.training_opts["coverage_ratio"] = self.calculate_coverage_ratio()
          logger.debug("Set training data: %s", self.training_opts)
  
      def calculate_coverage_ratio(self):
          """ Coverage must be a ratio, leading to a cropped shape divisible by 2 """
 
</s> remove         alignments:             dict containing paths to alignments files for keys 'a' and 'b'
        preview_scaling:        How much to scale the preview out by
        training_size:          Size of the training images
        coverage_ratio:         Ratio of face to be cropped out for training
        replicate_input_mask:   Replicate input masks with additional model dedicated layers
        no_logs:                Disable tensorboard logging
        snapshot_interval:      Interval for saving model snapshots
        warp_to_landmarks:      Use random_warp_landmarks instead of random_warp
        augment_color:          Perform random shifting of L*a*b* colors
        no_flip:                Don't perform a random flip on the image
        pingpong:               Train each side seperately per save iteration rather than together
 </s> add         alignments:         dict containing paths to alignments files for keys 'a' and 'b'
        preview_scaling:    How much to scale the preview out by
        training_size:      Size of the training images
        coverage_ratio:     Ratio of face to be cropped out for training
        mask_type:          Type of mask to use. See lib.model.masks for valid mask names.
                            Set to None for not used
        no_logs:            Disable tensorboard logging
        snapshot_interval:  Interval for saving model snapshots
        warp_to_landmarks:  Use random_warp_landmarks instead of random_warp
        augment_color:      Perform random shifting of L*a*b* colors
        no_flip:            Don't perform a random flip on the image
        pingpong:           Train each side seperately per save iteration rather than together </s> remove     def compile_sample(self, batch_size, samples=None, images=None, masks=None):
 </s> add     def compile_sample(self, batch_size, samples=None, images=None): </s> remove     def set_serializer(self):
        """ Set the serializer to be used for loading and
            saving alignments """
        if hasattr(self.args, "serializer") and self.args.serializer:
            logger.debug("Serializer provided: '%s'", self.args.serializer)
            serializer = self.args.serializer
        else:
            # If there is a full filename then this will be overriden
            # by filename extension
            serializer = "json"
            logger.debug("No Serializer defaulting to: '%s'", serializer)
        return serializer

 </s> add  </s> remove         retval = (self.model.training_opts.get("replicate_input_mask", False) or
                  self.model.training_opts.get("penalized_mask_loss", True))
 </s> add         retval = bool(self.model.training_opts.get("mask_type", None))
        self.training_opts["mask_type"] = self.config.get("mask_type", None)
          logger.debug("Setting training data")
          # Force number of preview images to between 2 and 16
          self.training_opts["training_size"] = self.state.training_size
          self.training_opts["no_logs"] = self.state.current_session["no_logs"]
        self.training_opts["mask_type"] = self.config.get("mask_type", None)
          self.training_opts["coverage_ratio"] = self.calculate_coverage_ratio()
          logger.debug("Set training data: %s", self.training_opts)
  
      def calculate_coverage_ratio(self):
          """ Coverage must be a ratio, leading to a cropped shape divisible by 2 """
keep keep keep add keep keep keep keep keep
 Serialize masks to alignments file

- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version 
plugins/train/model/_base.py