                  updated = True
                  logger.info("Updated 'mask_type' from '%s' to '%s' for this model",
                              old_mask, self._config[new])
  
          logger.debug("State file updated for legacy config: %s", updated)
          return updated
  
      def _update_changed_config_items(self, config_changeable_items: dict) -> None:
          """ Update any parameters which are not fixed and have been changed.
  
 
</s> remove         priors = ["dssim_loss", "mask_type", "mask_type"]
        new_items = ["loss_function", "learn_mask", "mask_type"]
 </s> add         priors = ["dssim_loss", "mask_type", "mask_type", "l2_reg_term"]
        new_items = ["loss_function", "learn_mask", "mask_type", "loss_function_2"] </s> remove     def _add_l2_regularization_term(self, loss_wrapper, mask_channel):
        """ Check if an L2 Regularization term should be added and add to the loss function
        wrapper.
 </s> add     def _add_face_loss_function(self,
                                loss_wrapper: losses.LossWrapper,
                                loss_function: Callable,
                                weight: float) -> None:
        """ Add the given face loss function at the given weight and apply any mouth and eye
        multipliers </s> remove     def _set_loss(self):
 </s> add     def _set_loss(self) -> None:
        # pylint:disable=line-too-long </s> remove     def _set_globals(self):
 </s> add     def _set_globals(self) -> None: </s> remove         if self._config["loss_function"] in self._uses_l2_reg and self._config["l2_reg_term"] > 0:
            logger.debug("Adding L2 Regularization for Structural Loss")
            loss_wrapper.add_loss(self._loss_dict["mse"],
                                  weight=self._config["l2_reg_term"] / 100.0,
                                  mask_channel=mask_channel)
 </s> add         logger.debug("Adding loss function: %s, weight: %s", loss_function, weight)
        loss_wrapper.add_loss(loss_function,
                              weight=weight,
                              mask_channel=self._mask_channels[0])

        channel_idx = 1
        for section in ("eye_multiplier", "mouth_multiplier"):
            mask_channel = self._mask_channels[channel_idx]
            multiplier = self._config[section] * 1.
            if multiplier > 1.:
                logger.debug("Adding section loss %s: %s", section, multiplier)
                loss_wrapper.add_loss(loss_function,
                                      weight=weight * multiplier,
                                      mask_channel=mask_channel)
            channel_idx += 1
            # Replace l2_reg_term with the correct loss_2_function and update the value of
            # loss_2_weight
            if old == "l2_reg_term":
                self._config[new] = "mse"
                self._config["loss_weight_2"] = self._config[old]
                del self._config[old]
                updated = True
                logger.info("Updated config from legacy 'l2_reg_term' to 'loss_function_2'")

                  updated = True
                  logger.info("Updated 'mask_type' from '%s' to '%s' for this model",
                              old_mask, self._config[new])
  
            # Replace l2_reg_term with the correct loss_2_function and update the value of
            # loss_2_weight
            if old == "l2_reg_term":
                self._config[new] = "mse"
                self._config["loss_weight_2"] = self._config[old]
                del self._config[old]
                updated = True
                logger.info("Updated config from legacy 'l2_reg_term' to 'loss_function_2'")

          logger.debug("State file updated for legacy config: %s", updated)
          return updated
  
      def _update_changed_config_items(self, config_changeable_items: dict) -> None:
          """ Update any parameters which are not fixed and have been changed.
  
keep keep keep add keep keep keep keep keep keep
 Training updates
  - Add multiple selected loss functions
  - Unlock loss as a model configuration
  - Phaze-A remove encoder scaling max xap 
plugins/train/model/_base/model.py