  
      @property
      def use_mask(self):
          """ Return True if a mask is requested """
          retval = (self.model.training_opts.get("replicate_input_mask", False) or
                    self.model.training_opts.get("penalized_mask_loss", True))
          logger.debug(retval)
          return retval
  
      def process_training_opts(self):
          """ Override for processing model specific training options """
 
</s> remove         return self.config.get("replicate_input_mask", False)
 </s> add         return self.config.get("mask_type", None) is not None </s> remove         retval = opts["warp_to_landmarks"]
 </s> add         retval = bool(opts.get("mask_type", None) or opts["warp_to_landmarks"]) </s> remove         if self.config["replicate_input_mask"] or self.config["penalized_mask_loss"]:
            # penalized mask doesn't have a mask ouput, so we can't use output shapes
            # mask should always be last output..this needs to be a rule
            mask_shape = output_network.output_shapes[-1]
            inputs.append(Input(shape=(mask_shape[1:-1] + (1,)), name="mask_in"))
 </s> add         mask_idx = [idx for idx, name in enumerate(output_network.output_names)
                    if name.startswith("mask")]
        if mask_idx:
            # Add the final mask shape as input
            mask_shape = output_network.output_shapes[mask_idx[0]]
            inputs.append(Input(shape=mask_shape[1:], name="mask_in")) </s> remove             logger.debug("Serializer set from argument: '%s'", serializer)
            retval = get_serializer(serializer)
 </s> add             logger.debug("Returning default Pickle serializer")
            retval = get_serializer("compressed") </s> remove     logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    return _JSONSerializer()
 </s> add         retval = _JSONSerializer
    else:
        logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    logger.debug(retval)
    return retval
        retval = bool(self.model.training_opts.get("mask_type", None))
  
      @property
      def use_mask(self):
          """ Return True if a mask is requested """
        retval = bool(self.model.training_opts.get("mask_type", None))
        retval = bool(self.model.training_opts.get("mask_type", None))
          logger.debug(retval)
          return retval
  
      def process_training_opts(self):
          """ Override for processing model specific training options """
keep keep keep keep replace replace 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/trainer/_base.py