Skip to content

Commit

Permalink
fixed deprecated function call in PCA-layers.
Browse files Browse the repository at this point in the history
  • Loading branch information
MLRichter committed Mar 27, 2023
1 parent 04ef70f commit 79657ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions delve/pca_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ def _compute_autorcorrelation(self) -> torch.Tensor:
return cov_mtx

def _compute_eigenspace(self):
self.eigenvalues.data, self.eigenvectors.data = self._compute_autorcorrelation(
).symeig(True) #.type(self.data_dtype)
self.eigenvalues.data, self.eigenvectors.data = torch.linalg.eigh(
self._compute_autorcorrelation(), UPLO='U'
) #.type(self.data_dtype)
self.eigenvalues.data, idx = self.eigenvalues.sort(descending=True)
# correct numerical error, matrix must be positivly semi-definitie
self.eigenvalues[self.eigenvalues < 0] = 0
Expand Down

0 comments on commit 79657ee

Please sign in to comment.