Replies: 2 comments
-
Thanks for this issue. I think that you are right that it's more intuitive to first transpose the matrix before using it, e.g.: self.matrix = matrix.t() We use this linear transformation mostly for augmentation, in which it does not matter whether to apply the correct or inverse transformation. Nonetheless, I think we should fix this. Are you interested in contributing this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok, sounds good. Just submitted a PR #2777. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering if the conventions for the LinearTransformation class are. Specifically, how the linear transformation is actually applied.
In many settings, I'm familiar with the standard pre-multiplication convention for a rotation. For instance, if I have matrices
then I would expect that the linear transformation of this vector t would be:
Both of these yield dx1 matrices.
Understandably, when things are batched, you might want to use matmul slightly differently to maintain shapes. In the LinearTransformation class, data.pos has a shape of [N x d], where N is the number of points and d is the dimensionality of the points (d=2 or d=3, typically). When applying the transformation, the code in LinearTransformation applies:
which does in fact yield a [N x d] matrix, since
matrix
is square. However, this is a different operation than the convention I mentioned in the first example. In fact, ifmatrix
is a rotation matrix (and thus orthonormal), it applies the inverse transformation (since R^(-1) = R.T). Modifying the above line to:would put the result in line with my expectation, since it's equivalent to:
My question is: what is the intended convention in
LinearTransformation
? Because when consumers of LinearTransformation construct their rotation matrices, they seem to be constructing them in a way that expects the "left-multiply" convention I described (for instance, RandomRotation constructs rotations using standard left-multiply rotation matrix conventions).Thanks again for a great library :)
Beta Was this translation helpful? Give feedback.
All reactions