iskra.signed_svd#

iskra.signed_svd.print_grad(x)[SOURCE]#

Identity function that prints gradient during backward.

iskra.signed_svd.closest_rot_3x3(x: Tensor) Tensor[SOURCE]#

Computes the closest rotation matrix to an arbitrary 3x3 matrix.

!!! warning:

The function is LLM generated based on the write-up by Julian Panetta: https://julianpanetta.com/pdf/notes/PolarDecomposition.pdf While it has worked in limited practical tests, it still needs to be hand-validated and tested.

Parameters:

x (Tensor[Float, [Bs, 3, 3]]) – A batched 3x3 matrix.

Returns:

(Tensor[Float, [Bs, 3, 3]]) – Closest rotation matrix.