  
      def mask_loss_function(self, mask, side, initialize):
          """ Set the loss function for masks
              Side is input so we only log once """
          if self.config.get("dssim_mask_loss", False):
              if side == "a" and not self.predict and initialize:
                  logger.verbose("Using DSSIM Loss for mask")
              mask_loss_func = DSSIMObjective()
          else:
              if side == "a" and not self.predict:
                  logger.verbose("Using Mean Absolute Error Loss for mask")
              mask_loss_func = losses.mean_absolute_error
  
          if self.config.get("penalized_mask_loss", False):
              if side == "a" and not self.predict and initialize:
                  logger.verbose("Using Penalized Loss for mask")
              mask_loss_func = PenalizedLoss(mask, mask_loss_func)
 
</s> remove         optimizer = self.get_optimizer(lr=5e-5, beta_1=0.5, beta_2=0.999)
 </s> add         learning_rate = self.config.get("learning_rate", 5e-5)
        optimizer = self.get_optimizer(lr=learning_rate, beta_1=0.5, beta_2=0.999) </s> remove             info="If using a mask, Use Penalized loss for Mask training. Can stack with DSSIM.\n"
                 "May increase overall quality.")
 </s> add             info="If using a mask, Use Penalized loss for Mask training. \n"
                 "May increase overall quality. This should probably be left at True") </s> remove             info="Use reflect padding rather than zero padding.")
        self.add_item(
            section=section, title="dssim_mask_loss", datatype=bool, default=True,
            info="If using a mask, Use DSSIM loss for Mask training rather than Mean Absolute "
                 "Error\nMay increase overall quality.")
 </s> add             info="Use reflect padding rather than zero padding. Only enable this option if the "
                 "model you are training has a distinct line appearing around the edge of the "
                 "swap area.")
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
  
      def mask_loss_function(self, mask, side, initialize):
          """ Set the loss function for masks
              Side is input so we only log once """
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
        if side == "a" and not self.predict:
            logger.verbose("Using Mean Absolute Error Loss for mask")
        mask_loss_func = losses.mean_absolute_error
  
          if self.config.get("penalized_mask_loss", False):
              if side == "a" and not self.predict and initialize:
                  logger.verbose("Using Penalized Loss for mask")
              mask_loss_func = PenalizedLoss(mask, mask_loss_func)
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 Correct dfaker config.
Make lr configurable 
plugins/train/model/_base.py