spd_learn.functional.log_tokens_to_spd#
- spd_learn.functional.log_tokens_to_spd(tokens: Tensor, *, preserve_norm: bool = False, matrix_scale: float = 1.0) Tensor[source]#
Reconstruct matrices from symmetric log coordinates.
- Parameters:
tokens (torch.Tensor) – Log coordinates of shape (…, n * (n + 1) // 2).
preserve_norm (bool, default=False) – Scale off-diagonal coordinates by sqrt(2).
matrix_scale (float, default=1.0) – Positive matrix multiplier before the logarithm.
- Returns:
Reconstructed matrices of shape (…, n, n), after undoing matrix_scale.
- Return type:
Notes
Use the same basis and scale as the forward map. Previously floored eigenvalues cannot be recovered.