          learning_rate = self.config.get("learning_rate", 5e-5)
          optimizer = self.get_optimizer(lr=learning_rate, beta_1=0.5, beta_2=0.999)
  
          for side, model in self.predictors.items():
              mask_input = [inp for inp in model.inputs if inp.name.startswith("mask")]
              loss = Loss(model.outputs, mask_input)
              model.compile(optimizer=optimizer, loss=loss.funcs)
              if initialize:
                  self.state.add_session_loss_names(side, loss.names)
                  self.history[side] = list()
          logger.debug("Compiled Predictors. Losses: %s", loss.names)
 
</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         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 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         # Only return the output shape of the face
 </s> add 
            loss = Loss(model.inputs, model.outputs)
          learning_rate = self.config.get("learning_rate", 5e-5)
          optimizer = self.get_optimizer(lr=learning_rate, beta_1=0.5, beta_2=0.999)
  
          for side, model in self.predictors.items():
            loss = Loss(model.inputs, model.outputs)
            loss = Loss(model.inputs, model.outputs)
              model.compile(optimizer=optimizer, loss=loss.funcs)
              if initialize:
                  self.state.add_session_loss_names(side, loss.names)
                  self.history[side] = list()
          logger.debug("Compiled Predictors. Losses: %s", loss.names)
keep keep keep keep replace replace keep keep keep keep keep
 Fix penalized loss for multiscale decoders 
plugins/train/model/_base.py