          kernel = tf.tile(kernel, multiples=[1, 1, shape1[-1], 1])
  
          # The correct compensation factor is `1.0 - tf.reduce_sum(tf.square(kernel))`,
          # but to match MATLAB implementation of MS-SSIM, we use 1.0 instead.
          compensation = 1.0
  
          # TODO(sjhwang): Try FFT.
          # TODO(sjhwang): Gaussian kernel is separable in space. Consider applying
          #   1-by-n and n-by-1 Gaussain filters instead of an n-by-n filter.
  
 
</s> remove         factor = dict(gaussian=0.8,
                      normalized=0.5)
 </s> add         factor = dict(gaussian=0.8, normalized=0.5) </s> remove             num1 = reducer(var_x * var_y, kernel) * 2.0
            den1 = reducer(tf.square(var_x) + tf.square(var_y), kernel)
            c_2 *= compensation
            c_s = (num1 - num0 + c_2) / (den1 - den0 + c_2)
 </s> add             num1 = reducer(img1 * img2, kernel) * 2.0
            den1 = reducer(tf.square(img1) + tf.square(img2), kernel)
            c_s = (num1 - num0 + c_two) / (den1 - den0 + c_two) </s> remove                 # Overwrite previous ssim value since we only need the last one.
                ssim_per_channel, c_s = _ssim_per_channel(*imgs, max_val=max_val)
                mc_s.append(tf.nn.relu(c_s))
 </s> add             # Overwrite previous ssim value since we only need the last one.
            ssim_per_channel, c_s = _ssim_per_channel(*imgs, max_val=max_val)
            mc_s.append(tf.nn.relu(c_s)) </s> remove             _ssim_k1 = 0.01
            _ssim_k2 = 0.03

            c_1 = (_ssim_k1 * max_val) ** 2
            c_2 = (_ssim_k2 * max_val) ** 2
 </s> add             c_one = (0.01 * max_val) ** 2
            c_two = ((0.03 * max_val)) ** 2 * compensation </s> remove         def _ssim_helper(var_x, var_y, max_val, kernel, compensation=1.0):
 </s> add         def _ssim_helper(img1, img2, max_val, kernel, compensation=1.):
        compensation = 1.
          kernel = tf.tile(kernel, multiples=[1, 1, shape1[-1], 1])
  
          # The correct compensation factor is `1.0 - tf.reduce_sum(tf.square(kernel))`,
          # but to match MATLAB implementation of MS-SSIM, we use 1.0 instead.
        compensation = 1.
  
          # TODO(sjhwang): Try FFT.
          # TODO(sjhwang): Gaussian kernel is separable in space. Consider applying
          #   1-by-n and n-by-1 Gaussain filters instead of an n-by-n filter.
  
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 
lib/model/losses.py