spd_learn.functional.modeig_forward#
- spd_learn.functional.modeig_forward(X, applied_fct, *args)[source]#
Forward pass for the modified eigenvalue of a symmetric matrix.
This function computes the forward pass for a function that modifies the eigenvalues of a symmetric matrix.
- Parameters:
X (torch.Tensor) – Symmetric matrix of shape (…, n, n).
applied_fct (callable) – Function to apply to the eigenvalues.
*args (tuple) – Additional arguments for the applied function.
- Returns:
output (torch.Tensor) – Modified matrix after applying the function to the eigenvalues.
s (torch.Tensor) – Eigenvalues of X.
U (torch.Tensor) – Eigenvectors of X.
s_modified (torch.Tensor) – Modified eigenvalues after applying the function.