I was looking at the scipy.minimize
documentation to see if I could find a way to terminate optimization when the loss gets below some cut-off, and I couldn't see an obvious way to do it.
The callback option only lets me pass it the xk
, but I need to pass additional parameters to evaluate my loss.
Any thoughts on a straightforward way to do this?