Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary evaluation when line search is determined to have failed #783

Open
zhangyi-hu opened this issue Jun 4, 2020 · 0 comments
Open

Comments

@zhangyi-hu
Copy link

zhangyi-hu commented Jun 4, 2020

if (t.isNaN) throw new FirstOrderException(s"Line search zoom failed")

The throw can happen as soon as we find that t is Nan.

    val t = if (low.t > hi.t) interp(hi, low) else interp(low, hi)
     // Evaluate objective at t, and build bracket
    val c = phi(t)
    //logger.debug("ZOOM:\n c: " + c + " \n l: " + low + " \nr: " + hi)
    logger.info(
      "Line search t: " + t + " fval: " + c.fval +
        " rhs: " + (fval + c1 * c.t * dd) + " cdd: " + c.dd)

    if (t.isNaN) throw new FirstOrderException(s"Line search zoom failed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant