I have a custom loss f = x + y where I have constraints such that while optimising f, x should be within a range of (0.10, 0.2) and y within the range of (0.6, 0.1), y is the mean square difference between the actual and predicted labels and x is different types of jobs. The model is not trained based on x; however, it's required to be optimized on getting different types of jobs within the prediction.
I came across Scipy.optimize: how to restrict argument values on how scipy.optimize can be used with bounds of the parameter of a function. However, my main problem is that I have a custom loss function total_loss(y_pred, y_true) and it works with Keras as a loss function using "SGD" as optimizer. Now, for incorporating the bound range of the parameter, I would like to use scipy.optimize.minimise with Keras. Any direction on how to use scipy.optimize on model.compile in Keras?