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

@rcurtin rcurtin 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.

Copy link
Member

@zoq zoq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rcurtin
Copy link
Member Author

rcurtin commented Sep 17, 2019

@mlpack-jenkins test this please

Copy link

@mlpack-bot mlpack-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second approval provided automatically after 24 hours. 👍

@favre49 favre49 merged commit 0f9dc82 into mlpack:master Sep 18, 2019
@rcurtin rcurtin deleted the lbfgs-scaling-factor branch September 23, 2019 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants