  
      def compile_predictors(self):
          """ Compile the predictors """
          logger.debug("Compiling Predictors")
          optimizer = Adam(lr=5e-5, beta_1=0.5, beta_2=0.999, clipnorm=1.0)
  
          for side, model in self.predictors.items():
              loss_names = ["loss"]
              loss_funcs = [self.loss_function(side)]
              mask = [inp for inp in model.inputs if inp.name.startswith("mask")]
 
</s> remove         out = [tensor.get_shape().as_list()[-3:] for tensor in model.outputs]
 </s> add         # PlaidML doesn't support tensor.get_shape()
        if keras.backend.backend() == "plaidml.keras.backend":
            out = [list(tensor.shape.dims)[-3:] for tensor in model.outputs]
        else:
            out = [tensor.get_shape().as_list()[-3:] for tensor in model.outputs] </s> remove         inputs = {tensor.name: tensor.get_shape().as_list()[-3:] for tensor in model.inputs}
 </s> add         # PlaidML doesn't support tensor.get_shape()
        if keras.backend.backend() == "plaidml.keras.backend":
            inputs = {tensor.name: list(tensor.shape.dims)[-3:] for tensor in model.inputs}
        else:
            inputs = {tensor.name: tensor.get_shape().as_list()[-3:] for tensor in model.inputs}
        # PlaidML has a bug regarding the clipnorm parameter
        # See: https://github.com/plaidml/plaidml/issues/228
        # Workaround by simply removing it.
        # TODO: Remove this as soon it is fixed in PlaidML.
        if keras.backend.backend() == "plaidml.keras.backend":
            optimizer = Adam(lr=5e-5, beta_1=0.5, beta_2=0.999)
        else:
            optimizer = Adam(lr=5e-5, beta_1=0.5, beta_2=0.999, clipnorm=1.0)
  
      def compile_predictors(self):
          """ Compile the predictors """
          logger.debug("Compiling Predictors")
        # PlaidML has a bug regarding the clipnorm parameter
        # See: https://github.com/plaidml/plaidml/issues/228
        # Workaround by simply removing it.
        # TODO: Remove this as soon it is fixed in PlaidML.
        if keras.backend.backend() == "plaidml.keras.backend":
            optimizer = Adam(lr=5e-5, beta_1=0.5, beta_2=0.999)
        else:
            optimizer = Adam(lr=5e-5, beta_1=0.5, beta_2=0.999, clipnorm=1.0)
  
          for side, model in self.predictors.items():
              loss_names = ["loss"]
              loss_funcs = [self.loss_function(side)]
              mask = [inp for inp in model.inputs if inp.name.startswith("mask")]
keep keep keep keep replace keep keep keep keep keep
 Plaidml handling in model/_base (#624) 
plugins/train/model/_base.py