      def expand_helptext(helptext, choices, default, datatype, min_max, fixed):
          """ Add extra helptext info from parameters """
          if not fixed:
              helptext += "\nThis option can be updated for existing models."
          if choices:
              helptext += "\nChoose from: {}".format(choices)
          elif datatype == bool:
              helptext += "\nChoose from: True, False"
 
</s> remove             elif self._config["penalized_mask_loss"]:
                loss_func = losses.PenalizedLoss(selected_loss)
 </s> add  </s> remove         self._get_loss_names(model.outputs)
        self._get_loss_functions(model.output_names)
 </s> add         self._set_loss_names(model.outputs)
        self._set_loss_functions(model.output_names) </s> remove                 loss_func = selected_loss
 </s> add                 if (self._config["loss_function"] in self._uses_l2_reg
                        and self._config["l2_reg_term"] != 0):
                    loss_funcs = [selected_loss, self._loss_dict["mse"]]
                    loss_weights = [1.0, self._config["l2_reg_term"] / 100.0]
                else:
                    loss_funcs = [selected_loss]
                    loss_weights = [1.0]

                if self._config["penalized_mask_loss"]:
                    loss_funcs = [losses.PenalizedLoss(loss) for loss in loss_funcs]

                loss_func = losses.LossWrapper(loss_functions=list(zip(loss_funcs, loss_weights)))
 </s> remove             if get_backend() == "amd":
                self._funcs[output_name] = loss_func
            else:
                self._funcs.setdefault(output_name, []).append(loss_func)
        logger.debug(self._funcs)
 </s> add             self._funcs[output_name] = loss_func
        logger.debug("functions: %s", self._funcs) </s> remove     def _get_loss_functions(self, output_names):
        """ Set the loss functions.
 </s> add     def _set_loss_functions(self, output_names):
        """ Set the loss functions and their associated weights.
        helptext += "\n"
      def expand_helptext(helptext, choices, default, datatype, min_max, fixed):
          """ Add extra helptext info from parameters """
        helptext += "\n"
          if not fixed:
              helptext += "\nThis option can be updated for existing models."
          if choices:
              helptext += "\nChoose from: {}".format(choices)
          elif datatype == bool:
              helptext += "\nChoose from: True, False"
keep add keep keep keep keep keep keep
 Training - Add L2 Regularization to Structural Losses 
lib/config.py