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

Handling nan output from Adam optimizer when generating reference parameters #93

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

xuyuon
Copy link
Contributor

@xuyuon xuyuon commented Jul 13, 2024

When trying to generate a set of reference parameters for the heterodyning likelihood, the output list of log likelihood often contains some nan values. When we try to search for the minimum log likelihood using argmin() on a list containing nan values, it will result in a list of nan as the reference parameters, causing the program to run into a bug. I think it would be a better idea to replace argmin() with nanargmin(). This will allow the code to search for the minimum log likelihood while ignoring the nan values. This approach will enable the code to proceed, but it should still output a warning to notify the user that nan values were present in the log likelihood list.

@kazewong kazewong merged commit fe0e767 into kazewong:main Jul 16, 2024
3 of 5 checks passed
@xuyuon xuyuon deleted the fix-nan branch July 24, 2024 17:51
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

Successfully merging this pull request may close these issues.

2 participants