How to use piece-wise defined derivative with Julia’s Optim package?
I’m trying to implement projected Gradient Descent with projected line searches as described here. Unfortunately when I pass a piecewise defined objective function and its gradient (using the clamp function) I get the error below.