  
  
  class Loss():
      """ Holds loss names and functions for an Autoencoder """
      def __init__(self, outputs, mask_input):
          logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                       self.__class__.__name__, outputs, mask_input)
          self.outputs = outputs
          self.names = self.get_loss_names()
          self.funcs = self.get_loss_functions(mask_input)
          if len(self.names) > 1:
              self.names.insert(0, "total_loss")
 
</s> remove         self.funcs = self.get_loss_functions(mask_input)
 </s> add         self.funcs = self.get_loss_functions() </s> remove         output_types = ["mask" if shape[-1] == 1 else "face" for shape in self.loss_shapes]
 </s> add         output_types = ["mask" if shape[-1] == 1 else "face" for shape in self.output_shapes] </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     def get_loss_functions(self, mask):
 </s> add     def get_loss_functions(self):
    def __init__(self, inputs, outputs):
        logger.debug("Initializing %s: (inputs: %s, outputs: %s)",
                     self.__class__.__name__, inputs, outputs)
        self.inputs = inputs
  
  
  class Loss():
      """ Holds loss names and functions for an Autoencoder """
    def __init__(self, inputs, outputs):
        logger.debug("Initializing %s: (inputs: %s, outputs: %s)",
                     self.__class__.__name__, inputs, outputs)
        self.inputs = inputs
    def __init__(self, inputs, outputs):
        logger.debug("Initializing %s: (inputs: %s, outputs: %s)",
                     self.__class__.__name__, inputs, outputs)
        self.inputs = inputs
    def __init__(self, inputs, outputs):
        logger.debug("Initializing %s: (inputs: %s, outputs: %s)",
                     self.__class__.__name__, inputs, outputs)
        self.inputs = inputs
          self.outputs = outputs
          self.names = self.get_loss_names()
          self.funcs = self.get_loss_functions(mask_input)
          if len(self.names) > 1:
              self.names.insert(0, "total_loss")
keep keep keep keep replace replace replace keep keep keep keep keep
 Fix penalized loss for multiscale decoders 
plugins/train/model/_base.py