spd_learn.functional.spd_egrad2rgrad#
- spd_learn.functional.spd_egrad2rgrad(x: Tensor, u: Tensor) Tensor[source]#
Compute the Riemannian gradient from the Euclidean gradient under the AIRM metric.
The relationship between the Euclidean gradient \(\nabla_X \mathcal{J}\) and the Riemannian gradient \(\text{grad}_X \mathcal{J}\) under the AIRM metric is given by:
\[\text{grad}_X \mathcal{J} = X (\nabla_X \mathcal{J})_{sym} X\]where \((\cdot)_{sym}\) denotes the symmetric part.
- Parameters:
x (torch.Tensor) – Base point on the manifold, shape (…, n, n).
u (torch.Tensor) – Euclidean gradient at x, shape (…, n, n).
- Returns:
Riemannian gradient at x, shape (…, n, n).
- Return type: