          return loss_names
  
      def update_loss_names(self):
          """ Update loss names if named incorrectly or legacy model """
          output_types = ["mask" if shape[-1] == 1 else "face" for shape in self.loss_shapes]
          loss_names = ["{}{}".format(name,
                                      "" if output_types.count(name) == 1 else "_{}".format(idx))
                        for idx, name in enumerate(output_types)]
          logger.debug("Renamed loss names to: %s", loss_names)
          return loss_names
 
</s> remove     def get_loss_functions(self, mask):
 </s> add     def get_loss_functions(self): </s> remove     def largest_output(self):
        """ Return the index of the largest face output """
        max_size = max(shape[0] for shape in self.loss_shapes if shape[2] == 3)
        largest_idx = [idx for idx, shape in enumerate(self.loss_shapes)
                       if shape[0] == max_size and shape[2] == 3][0]
        return largest_idx
 </s> add     def mask_input(self):
        """ Return the mask input or None """
        mask_inputs = [inp for inp in self.inputs if inp.name.startswith("mask")]
        if not mask_inputs:
            return None
        return mask_inputs[0]

    @property
    def mask_shape(self):
        """ Return the mask shape """
        if self.mask_input is None:
            return None
        return K.int_shape(self.mask_input)[1:] </s> remove             mask_input = [inp for inp in model.inputs if inp.name.startswith("mask")]
            loss = Loss(model.outputs, mask_input)
 </s> add             loss = Loss(model.inputs, model.outputs) </s> remove         largest_face = self.largest_output
        loss_dict = {'mae':                     losses.mean_absolute_error,
                     'mse':                     losses.mean_squared_error,
                     'logcosh':                 losses.logcosh,
                     'smooth_l1':               generalized_loss,
                     'l_inf_norm':              l_inf_norm,
                     'ssim':                    DSSIMObjective(),
                     'gmsd':                    gmsd_loss,
                     'pixel_gradient_diff':     gradient_loss}
        img_loss_config = self.config.get("loss_function", "mae")
        mask_loss_config = "mse"

 </s> add 
        output_types = ["mask" if shape[-1] == 1 else "face" for shape in self.output_shapes]
          return loss_names
  
      def update_loss_names(self):
          """ Update loss names if named incorrectly or legacy model """
        output_types = ["mask" if shape[-1] == 1 else "face" for shape in self.output_shapes]
          loss_names = ["{}{}".format(name,
                                      "" if output_types.count(name) == 1 else "_{}".format(idx))
                        for idx, name in enumerate(output_types)]
          logger.debug("Renamed loss names to: %s", loss_names)
          return loss_names
keep keep keep keep replace keep keep keep keep keep
 Fix penalized loss for multiscale decoders 
plugins/train/model/_base.py