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){ |