You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example the so3 and se3 lie group actions also depend on quaternions.
Tracing the bug
The bug is caused by a call to Tensor.cross, which finds the first dimension of size=3 as vec3. The code can be found in Quaternion.__mul__. Replacing the call with a more stable torch.linalg.cross can fix the issue, according to my experiment.
It is weird that only expression c actually triggers the bug. PyTorch actually gives a warning of Tensor.cross deprecated but no one seems to be caring?
Can I possibly help fix it in a PR?
One more question
Is Quaternion class designed to be not supporting broadcasting? Why those modules default to be requires_grad=True even when initializers are requires_grad=False?
Reproduction steps
Just run the sample code.
Expected behavior
All four expressions should give the same result.
Environment
kornia 0.7.2.dev0, torch 2.2.1
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
The expression
c
should give the same result but it actually goes wrong.The code gives
May affect more behaviors
For example the so3 and se3 lie group actions also depend on quaternions.
Tracing the bug
The bug is caused by a call to
Tensor.cross
, which finds the first dimension of size=3 as vec3. The code can be found inQuaternion.__mul__
. Replacing the call with a more stabletorch.linalg.cross
can fix the issue, according to my experiment.It is weird that only expression
c
actually triggers the bug. PyTorch actually gives a warning of Tensor.cross deprecated but no one seems to be caring?Can I possibly help fix it in a PR?
One more question
Is Quaternion class designed to be not supporting broadcasting? Why those modules default to be
requires_grad=True
even when initializers arerequires_grad=False
?Reproduction steps
Expected behavior
All four expressions should give the same result.
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: