      def multipass_factor(self):
          """ Multipass Factor
              For multiple passes the kernel must be scaled down. This value is
              different for box filter and gaussian """
          factor = dict(gaussian=0.8,
                        normalized=0.5)
          return factor[self.blur_type]
  
      @property
      def sigma(self):
          """ Sigma for Gaussian Blur
 
</s> remove         compensation = 1.0
 </s> add         compensation = 1. </s> remove         mask = np.zeros(self.model.state.mask_shapes[0], dtype="float32")
        retval = np.expand_dims(mask, 0)
        return retval
 </s> add         mask = np.zeros((1, ) + self.model.state.mask_shapes[0], dtype="float32")
        return mask </s> remove             """
            Function to mimic the 'fspecial' gaussian MATLAB function.
            """
 </s> add             """ Function to mimic the 'fspecial' gaussian MATLAB function. """
 </s> remove     true_edge_mag = scharr_edges(y_true, True)
    pred_edge_mag = scharr_edges(y_pred, True)
    cnst = 0.002
    upper = 2.0 * tf.multiply(true_edge_mag, pred_edge_mag) + cnst
    lower = tf.square(true_edge_mag) + tf.square(pred_edge_mag) + cnst
    gms = tf.div(upper, lower)
    _mean, _var = tf.nn.moments(gms, axes=[1, 2], keep_dims=True)
    # single metric value per image in tensor [?, 1, 1]
    gmsd = tf.reduce_mean(tf.sqrt(_var), axis=-1)
    # need to expand to [?, height, width] dimensions for Keras ... modify to not be hard-coded
    return K.tile(gmsd, [1, 64, 64])


def ms_ssim(img1, img2, max_val=1.0, power_factors=(0.0517, 0.3295, 0.3462, 0.2726)):
 </s> add     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)
    gmsd = K.std(gms, axis=(1, 2, 3), keepdims=True)
    gmsd = K.squeeze(gmsd, axis=-1)
    return gmsd


def ms_ssim_calc(img1, img2, max_val=1.0, power_factors=(0.0517, 0.3295, 0.3462, 0.2726)): </s> remove         dummy = np.zeros((20, 20, 3)).astype("uint8")
 </s> add         dummy = np.zeros((20, 20, 3), dtype="uint8")
        factor = dict(gaussian=0.8, normalized=0.5)
      def multipass_factor(self):
          """ Multipass Factor
              For multiple passes the kernel must be scaled down. This value is
              different for box filter and gaussian """
        factor = dict(gaussian=0.8, normalized=0.5)
        factor = dict(gaussian=0.8, normalized=0.5)
          return factor[self.blur_type]
  
      @property
      def sigma(self):
          """ Sigma for Gaussian Blur
keep keep keep keep 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 
plugins/convert/mask/_base.py