facebookresearch / theseus

A library for differentiable nonlinear optimization
MIT License
1.74k stars 124 forks source link

Fix broken backward graph when using `LieTensor.exp()` #631

Closed luisenp closed 9 months ago

luisenp commented 9 months ago

Closes #626

luisenp commented 9 months ago

@fantaosha The reason is that the standard LieTensor constructor is not a differentiable operation. If you want to make a new LieTensor in a differentiable way (e.g., as the result of an exp map), you need a tensor creation function that has a backward implementation. This is already available in FromTensor class, I just forgot to use it inside the exp map function.