  from keras.engine import InputSpec, Layer
  from keras.utils import conv_utils
  from keras.utils.generic_utils import get_custom_objects
  from keras import initializers
  from keras.layers import ZeroPadding2D
  
  if K.backend() == "plaidml.keras.backend":
      from lib.plaidml_utils import pad
  else:
      from tensorflow import pad 
 
</s> remove from tensorflow.contrib.distributions import Beta
 </s> add from tensorflow.distributions import Beta </s> remove from lib.model.losses import DSSIMObjective, PenalizedLoss
 </s> add from lib.model.losses import DSSIMObjective, PenalizedLoss, gradient_loss
from lib.model.losses import generalized_loss, l_inf_norm, gmsd_loss </s> remove         range_ = np.linspace(height // 2 - coverage // 2,
                             height // 2 + coverage // 2,
                             5, dtype='float32')
 </s> add         range_ = np.linspace(height // 2 - coverage, height // 2 + coverage, 5, dtype='float32') </s> remove _DEFAULTS = {
    "coverage": {
        "default": 100.0,
        "info": "How much of the extracted image to train on. Generally the model is optimized"
                "\nto the default value. Sensible values to use are:"
                "\n\t62.5%% spans from eyebrow to eyebrow."
                "\n\t75.0%% spans from temple to temple."
                "\n\t87.5%% spans from ear to ear."
                "\n\t100.0%% is a mugshot.",
        "datatype": float,
        "rounding": 1,
        "min_max": (62.5, 100.0),
        "choices": [],
        "gui_radio": False,
        "fixed": True,
    },
}
 </s> add _DEFAULTS = {} </s> remove     "coverage": {
        "default": 62.5,
        "info": "How much of the extracted image to train on. Generally the model is optimized"
                "\nto the default value. Sensible values to use are:"
                "\n\t62.5%% spans from eyebrow to eyebrow."
                "\n\t75.0%% spans from temple to temple."
                "\n\t87.5%% spans from ear to ear."
                "\n\t100.0%% is a mugshot.",
        "datatype": float,
        "rounding": 1,
        "min_max": (62.5, 100.0),
        "choices": [],
        "gui_radio": False,
        "fixed": True,
    },
 </s> add 
from keras.layers.pooling import _GlobalPooling2D
  from keras.engine import InputSpec, Layer
  from keras.utils import conv_utils
  from keras.utils.generic_utils import get_custom_objects
  from keras import initializers
from keras.layers.pooling import _GlobalPooling2D
  
  if K.backend() == "plaidml.keras.backend":
      from lib.plaidml_utils import pad
  else:
      from tensorflow import pad 
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/layers.py