  
      def converter(self, swap):
          """ Converter for autoencoder models """
          logger.debug("Getting Converter: (swap: %s)", swap)
          if swap:
              model = self.predictors["a"]
          else:
              model = self.predictors["b"]
          if self.predict:
              # Must compile the model to be thread safe
              model._make_predict_function()  # pylint: disable=protected-access
          retval = model.predict
          logger.debug("Got Converter: %s", retval)
 
</s> remove         dummy = np.zeros((20, 20, 3)).astype("uint8")
 </s> add         dummy = np.zeros((20, 20, 3), dtype="uint8") </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             self.args.gpus,
 </s> add             gpus=self.args.gpus, </s> remove     """ Keras ms_ssim loss """
    msssim = K.expand_dims(K.expand_dims(1.0 - ms_ssim(y_true, y_pred), axis=-1), axis=-1)
    # need to expand to [1, height, width] dimensions for Keras ... modify to not be hard-coded
    return K.tile(msssim, [1, 64, 64])
 </s> add     """ Keras loss function for MS-SSIM """
    expanded = K.expand_dims(1.0 - ms_ssim_calc(y_true, y_pred), axis=-1)
    loss = K.expand_dims(expanded, axis=-1)
    # need to expand to [1,height,width] dimensions for Keras. modify to not be hard-coded
    return K.tile(loss, [1, 64, 64]) </s> remove             closest = (np.mean(np.square(src_points - dst_points),
                               axis=(1, 2))).argsort()[:10]
 </s> add             closest = (np.mean(np.square(src_points - dst_points), axis=(1, 2))).argsort()[:10]
        side = "a" if swap else "b"
        model = self.predictors[side]
  
      def converter(self, swap):
          """ Converter for autoencoder models """
          logger.debug("Getting Converter: (swap: %s)", swap)
        side = "a" if swap else "b"
        model = self.predictors[side]
        side = "a" if swap else "b"
        model = self.predictors[side]
        side = "a" if swap else "b"
        model = self.predictors[side]
        side = "a" if swap else "b"
        model = self.predictors[side]
          if self.predict:
              # Must compile the model to be thread safe
              model._make_predict_function()  # pylint: disable=protected-access
          retval = model.predict
          logger.debug("Got Converter: %s", retval)
keep keep keep keep replace 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 
plugins/train/model/_base.py