Closed Maghoumi closed 3 years ago
It's a bit tricky because we're dealing with matrix outputs. Δ
maps x
to a distance matrix so it is a function from p x n
to n x m
. Therefore, its Jacobian is a linear map from p x n
to n x m
and its transpose is a linear map from n x m
top x n
. Therefore, the Jacobian transpose of Δ
maps B
, a matrix of size n x m
, to a gradient of size p x n
as expected. Appendix B.2 of our new paper explains that in some more details (in that paper, notation is different : time series are of shape n x d
).
By the way, I just found your package pytorch-softdtw-cuda
, it's great! Could you add the soft-dtw
tag to your repo? Thanks!
I was re-reading your paper recently a bit more carefully, and I have a question about the dimension of some matrices.
Specifically, in Eq 2.5, it's not really clear what the dimension of the jacobian matrix
d(delta(x, y)) / dx
is expected to be. Below, I've depicted the dimensions of all the matrices involved in the computation per the paper's notations. The right side of the equation yieldsp x n
(same shape asX
). But I don't understand how the dimensions are working out for the left side of the equation (the green doodles).Another question: my understanding is that in Alg. 2, the dimensionality of
E
isn x m
, and per the above, the output of Alg. 2 should bep x n
(same asX
). Am I correct?Thanks in advance!