      Barron, J. A More General Robust Loss Function
      https://arxiv.org/pdf/1701.03077.pdf
  
      Parameters:
          a: penalty factor. larger number give larger weight to large deviations
          c: scale factor used to adjust to the input scale (i.e. inputs of mean 1e-4 or 256)
  
      Return:
          a loss value from the results of function(y_pred - y_true)
  
      Example:
          a=1.0, x>>c , c=1.0/255.0 will give a smoothly differentiable version of L1 / MAE loss
 
</s> remove         a=1.999999 (lim as a->2), c=1.0/255.0 will give L2 / RMSE loss
 </s> add         a=1.999999 (lim as a->2), beta=1.0/255.0 will give L2 / RMSE loss </s> remove def generalized_loss_function(y_true, y_pred, var_a=1.0, cnst=1.0/255.0):
 </s> add def generalized_loss(y_true, y_pred, alpha=1.0, beta=1.0/255.0): </s> remove     var_x = y_pred - y_true
    loss = (K.abs(2.0-var_a)/var_a) * (K.pow(K.pow(var_x/cnst, 2.0)/K.abs(2.0-var_a) + 1.0,
                                             (var_a/2.0)) - 1.0)
    return K.mean(loss, axis=-1) * cnst
 </s> add     diff = y_pred - y_true
    second = (K.pow(K.pow(diff/beta, 2.) / K.abs(2.-alpha) + 1., (alpha/2.)) - 1.)
    loss = (K.abs(2.-alpha)/alpha) * second
    loss = K.mean(loss, axis=-1) * beta
    return loss </s> remove     TV+TV2 Regularization with Nonconvex Sparseness-Inducing Penalty for Image Restoration,
    Chengwu Lu & Hua Huang, 2014 (http://downloads.hindawi.com/journals/mpe/2014/790547.pdf)
 </s> add     TV+TV2 Regularization with Nonconvex Sparseness-Inducing Penalty
    for Image Restoration, Chengwu Lu & Hua Huang, 2014
    (http://downloads.hindawi.com/journals/mpe/2014/790547.pdf) </s> remove     Calculates the first and second order gradient difference between pixels of an image in the
    x and y dimensions. These gradients are then compared between the ground truth and the
    predicted image and the difference is taken. The difference used is a smooth L1 norm
    (approximate to MAE but differable at zero) When used as a loss, its minimization will result
    in predicted images approaching the samelevel of sharpness / blurriness as the ground truth.
 </s> add     Calculates the first and second order gradient difference between pixels of
    an image in the x and y dimensions. These gradients are then compared between
    the ground truth and the predicted image and the difference is taken. When
    used as a loss, its minimization will result in predicted images approaching
    the same level of sharpness / blurriness as the ground truth.
        alpha: penalty factor. larger number give larger weight to large deviations
        beta: scale factor used to adjust to the input scale (i.e. inputs of mean 1e-4 or 256 )
      Barron, J. A More General Robust Loss Function
      https://arxiv.org/pdf/1701.03077.pdf
  
      Parameters:
        alpha: penalty factor. larger number give larger weight to large deviations
        beta: scale factor used to adjust to the input scale (i.e. inputs of mean 1e-4 or 256 )
        alpha: penalty factor. larger number give larger weight to large deviations
        beta: scale factor used to adjust to the input scale (i.e. inputs of mean 1e-4 or 256 )
        alpha: penalty factor. larger number give larger weight to large deviations
        beta: scale factor used to adjust to the input scale (i.e. inputs of mean 1e-4 or 256 )
      Return:
          a loss value from the results of function(y_pred - y_true)
  
      Example:
          a=1.0, x>>c , c=1.0/255.0 will give a smoothly differentiable version of L1 / MAE loss
keep keep keep keep replace replace 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 
lib/model/losses.py