          return loss_names
  
      def get_loss_functions(self, side, predict, mask):
          """ Set the loss function """
          loss_funcs = list()
          largest_face = self.largest_output
  
          if self.config.get("dssim_loss", False):
              if not predict and side.lower() == "a":
                  logger.verbose("Using DSSIM Loss")
 
</s> remove 
        if self.config.get("dssim_loss", False):
            if not predict and side.lower() == "a":
                logger.verbose("Using DSSIM Loss")
            loss_func = DSSIMObjective()
        else:
            loss_func = losses.mean_absolute_error
            if not predict and side.lower() == "a":
                logger.verbose("Using Mean Absolute Error Loss")
 </s> add         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> remove                 face_func = PenalizedLoss(mask[0], loss_func)
                logger.debug("final face loss: %s", face_func)
                loss_funcs.append(face_func)
                if not predict and side.lower() == "a":
                    logger.verbose("Penalizing mask for Loss")
 </s> add                 loss_funcs.append(PenalizedLoss(mask[0], loss_dict[img_loss_config]))
                logger.debug("final face loss: %s", img_loss_config) </s> remove                 mask_func = losses.mean_squared_error
                loss_funcs.append(mask_func)
                logger.debug("mask loss: %s", mask_func)
 </s> add                 loss_funcs.append(loss_dict[mask_loss_config])
                logger.debug("mask loss: %s", mask_loss_config) </s> remove                 logger.debug("face loss func: %s", loss_func)
                loss_funcs.append(loss_func)
 </s> add                 loss_funcs.append(loss_dict[img_loss_config])
                logger.debug("face loss func: %s", img_loss_config) </s> remove def staircase_loss(y_true, y_pred, var_a=16.0, cnst=1.0/255.0):
    """ Keras Staircase Loss """
    height = cnst
    width = cnst
    var_x = K.clip(K.abs(y_true - y_pred) - 0.5 * cnst, 0.0, 1.0)
    loss = height*(K.tanh(var_a*((var_x/width)-tf.floor(var_x/width)-0.5)) /
                   (2.0*K.tanh(var_a/2.0)) + 0.5 + tf.floor(var_x/width))
    loss += 1e-10
    return K.mean(loss, axis=-1)
 </s> add def l_p_norm(y_true, y_pred, p_norm=np.inf):
    """
    Calculate the L-p norm as a loss function,
    valid choics of p are [0,1,no.inf]
    """
    diff = y_true - y_pred
    loss = tf.norm(diff, ord=p_norm, axis=-1)
    return loss


def l_inf_norm(y_true, y_pred):
    """ Calculate the L-inf norm as a loss function """
    diff = K.abs(y_true - y_pred)
    max_loss = K.max(diff, axis=(1, 2), keepdims=True)
    loss = K.mean(max_loss, axis=-1)
    return loss
        loss_funcs = []
          return loss_names
  
      def get_loss_functions(self, side, predict, mask):
          """ Set the loss function """
        loss_funcs = []
          largest_face = self.largest_output
  
          if self.config.get("dssim_loss", False):
              if not predict and side.lower() == "a":
                  logger.verbose("Using DSSIM Loss")
keep keep keep keep replace keep keep keep keep keep
 documentation, pep8, style, clarity updates  - Prep for Segmentation (#812)

* documentation, pep8, style, clarity updates

* Update cli.py

* Update _config.py

remove extra mask and coverage

mask type as dropdown

* Update training_data.py

move coverage / LR to global
cut down on loss description

style change
losses working in PR

* simpler logging

* legacy update 
plugins/train/model/_base.py