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

Numerical Instability Problem Solved with CPU-version C++ .find_span() for curve_eval.cpp #5

Open
mechyai opened this issue Oct 28, 2023 · 0 comments

Comments

@mechyai
Copy link

mechyai commented Oct 28, 2023

I was dealing with frequent 'randomly' occurring Nan results for the basis function evaluations when using the CPU, C++ curve_eval.cpp -- curve_pre_compute_basis(...) function which is used in curve_eval.py here (just for those new to this repo and facing the same issue). This would would then cause Nan in the curve evaluation and destroy any torch optimization loop.
I was able to solve this issue by removing the eps values in the .find_span() function here:

while (u < U[mid]-eps || u >= U[mid+1]+eps){

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