facebookresearch / theseus

A library for differentiable nonlinear optimization
MIT License
1.78k stars 128 forks source link

Implicit backward mode gives nan result #659

Open lpanaf opened 2 months ago

lpanaf commented 2 months ago

Hi, thanks for the nice project. I am now encountering some problems with the implicit backward mode: it very frequently gives NaN results for the last iteration. Here is one such example: https://drive.google.com/file/d/1IjcDdZSFFdlLf1w80rSDpzJ-ANzI_ouY/view?usp=drive_link. Running the issue.py file, and you should see nan error as well

Do you know what can be the reason? Thanks in advance!

luisenp commented 2 months ago

Thanks for reporting @lpanaf. Is there any chance you can build a smaller example that reproduces this error?

lpanaf commented 2 months ago

Hi, thanks for looking into the problem. This link should provide the necessary information to reproduce the error :) Running the issue.py file directly would be enough