          selected_loss = self._loss_dict[self._config["loss_function"]]
          for name, output_name in zip(self._names, output_names):
              if name.startswith("mask"):
                  loss_func = self._loss_dict[self._config["mask_loss_function"]]
              elif self._config["penalized_mask_loss"]:
                  loss_func = losses.PenalizedLoss(selected_loss)
              else:
                  loss_func = selected_loss
              logger.debug("%s: (output_name: '%s', function: %s)", name, output_name, loss_func)
              if get_backend() == "amd":
                  self._funcs[output_name] = loss_func
 
</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. </s> remove     def _get_loss_names(self, outputs):
 </s> add     def _set_loss_names(self, outputs):
          selected_loss = self._loss_dict[self._config["loss_function"]]
          for name, output_name in zip(self._names, output_names):
              if name.startswith("mask"):
                  loss_func = self._loss_dict[self._config["mask_loss_function"]]


              else:
                  loss_func = selected_loss
              logger.debug("%s: (output_name: '%s', function: %s)", name, output_name, loss_func)
              if get_backend() == "amd":
                  self._funcs[output_name] = loss_func
keep keep keep keep replace replace keep keep keep keep keep
 Training - Add L2 Regularization to Structural Losses 
plugins/train/model/_base.py