      https://arxiv.org/ftp/arxiv/papers/1308/1308.3052.pdf
  
      true_edge = scharr_edges(y_true, True)
      pred_edge = scharr_edges(y_pred, True)
      ephsilon = 0.0025
      upper = 2.0 * true_edge * pred_edge
      lower = K.square(true_edge) + K.square(pred_edge)
      gms = (upper + ephsilon) / (lower + ephsilon)
 
</s> remove     """
 </s> add  </s> remove     """
    Improved image quality metric over MS-SSIM with easier calc
 </s> add     """ Gradient Magnitude Similarity Deviation Loss.

    Improved image quality metric over MS-SSIM with easier calculations

    Parameters
    ----------
    y_true: tensor or variable
        The ground truth value
    y_pred: tensor or variable
        The predicted value

    Returns
    -------
    tensor
        The loss value

    References
    ---------- </s> remove     def diff_yy(img):
 </s> add     def _diff_yy(img):
        """ Y-Y Difference """ </s> remove     def diff_xx(img):
 </s> add     def _diff_xx(img):
        """ X-X Difference """ </s> remove     def diff_xy(img):
 </s> add     def _diff_xy(img):
        """ X-Y Difference """
    """
      https://arxiv.org/ftp/arxiv/papers/1308/1308.3052.pdf
  
    """
      true_edge = scharr_edges(y_true, True)
      pred_edge = scharr_edges(y_pred, True)
      ephsilon = 0.0025
      upper = 2.0 * true_edge * pred_edge
      lower = K.square(true_edge) + K.square(pred_edge)
      gms = (upper + ephsilon) / (lower + ephsilon)
keep add keep keep keep keep keep keep
 Simple backend unit tests (#1020)

* Add simple backend tests for lib.model
* Document lib.model
* Fix GMSD Loss for AMD
* Remove obsolete code from lib.model 
lib/model/losses.py