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

Check L-BFGS scaling factor for convergence #136

Merged
merged 2 commits into from Sep 18, 2019

Conversation

@rcurtin
Copy link
Member

commented Sep 16, 2019

While debugging some mlpack test failures I discovered that it is possible that scalingFactor for L-BFGS can be computed as 0.0 when the optimization is getting very close to convergence. This, then, causes a division by 0 later on in the code, and the returned iterate goes to a bunch of NaN garbage.

So, this change addresses that by catching the case where the scaling factor is computed as 0, and terminates successfully in that case.

@zoq
zoq approved these changes Sep 16, 2019
Copy link
Member

left a comment

Looks good to me.

@rcurtin

This comment has been minimized.

Copy link
Member Author

commented Sep 17, 2019

@mlpack-jenkins test this please

@mlpack-bot
mlpack-bot bot approved these changes Sep 17, 2019
Copy link

left a comment

Second approval provided automatically after 24 hours. 👍

@favre49 favre49 merged commit 0f9dc82 into mlpack:master Sep 18, 2019
2 of 3 checks passed
2 of 3 checks passed
mlpack master build test Build finished.
Details
Static Code Analysis Checks Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rcurtin rcurtin deleted the rcurtin:lbfgs-scaling-factor branch Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.