          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")
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      @property
 
</s> remove     def __init__(self, outputs, mask_input):
        logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                     self.__class__.__name__, outputs, mask_input)
 </s> add     def __init__(self, inputs, outputs):
        logger.debug("Initializing %s: (inputs: %s, outputs: %s)",
                     self.__class__.__name__, inputs, outputs)
        self.inputs = inputs </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     def gaussian_blur(radius=2.0):
        def gaussian(var_x, radius, sigma):
            return np.exp(-(float(var_x) - float(radius)) ** 2 / (2 * sigma ** 2))

        def make_kernel(sigma):
            kernel_size = max(3, int(2 * 2 * sigma + 1))
            mean = np.floor(0.5 * kernel_size)
            kernel_1d = np.array([gaussian(x, mean, sigma) for x in range(kernel_size)])
            np_kernel = np.outer(kernel_1d, kernel_1d).astype(dtype=K.floatx())
            kernel = np_kernel / np.sum(np_kernel)
            return kernel

        gauss_kernel = make_kernel(radius)
        gauss_kernel = gauss_kernel[:, :, np.newaxis, np.newaxis]

        def func(input_):
            inputs = [input_[:, :, :, i:i + 1] for i in range(K.int_shape(input_)[-1])]
            outputs = [K.conv2d(inp, K.constant(gauss_kernel), strides=(1, 1), padding="same")
                       for inp in inputs]
            return K.concatenate(outputs, axis=-1)
        return func
 </s> add  </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:]
        self.funcs = self.get_loss_functions()
          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()
          if len(self.names) > 1:
              self.names.insert(0, "total_loss")
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      @property
keep keep keep keep replace keep keep keep keep keep
 Fix penalized loss for multiscale decoders 
plugins/train/model/_base.py