      """ Test penalized loss wrapper works as expected """
      if get_backend() == "amd":
          if isinstance(loss_func, losses.FocalFrequencyLoss):
              pytest.skip("FocalFrequencyLoss Loss is not currently compatible with PlaidML")
          if hasattr(loss_func, "__name__") and loss_func.__name__ == "logcosh":
              pytest.skip("LogCosh Loss is not currently compatible with PlaidML")
      y_a = K.variable(np.random.random((2, 64, 64, 4)))
      y_b = K.variable(np.random.random((2, 64, 64, 3)))
      p_loss = losses.LossWrapper()
      p_loss.add_loss(loss_func, 1.0, -1)
      p_loss.add_loss(k_losses.mean_squared_error, 2.0, 3)
 
</s> remove             if isinstance(func, DSSIMObjective):
                # Extract Image Patches in SSIM requires that y_pred be of a known shape, so
                # specifically reshape the tensor.
                n_pred = K.reshape(n_pred, K.int_shape(y_pred))
 </s> add             # Some loss functions requires that y_pred be of a known shape, so specifically
            # reshape the tensor.
            n_pred = K.reshape(n_pred, K.int_shape(y_pred)) </s> remove         "is robust to outliers. NB: Due to a bug in PlaidML, this loss does not work on AMD "
        "cards."),
 </s> add         "is robust to outliers."),
      """ Test penalized loss wrapper works as expected """
      if get_backend() == "amd":
          if isinstance(loss_func, losses.FocalFrequencyLoss):
              pytest.skip("FocalFrequencyLoss Loss is not currently compatible with PlaidML")


      y_a = K.variable(np.random.random((2, 64, 64, 4)))
      y_b = K.variable(np.random.random((2, 64, 64, 3)))
      p_loss = losses.LossWrapper()
      p_loss.add_loss(loss_func, 1.0, -1)
      p_loss.add_loss(k_losses.mean_squared_error, 2.0, 3)
keep keep keep keep replace replace keep keep keep keep keep
 Enable LogCosh Loss for AMD 
tests/lib/model/losses_test.py