Skip to content

Commit

Permalink
replace torch.symeig with torch.linalg.eigh
Browse files Browse the repository at this point in the history
  • Loading branch information
carloalbertobarbano committed Jan 13, 2025
1 parent e621b86 commit 7c2a95f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchstain/torch/normalizers/multitarget.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def __find_concentration(self, OD, HE):
def __compute_matrices_single(self, I, Io, alpha, beta):
OD, ODhat = self.__convert_rgb2od(I, Io=Io, beta=beta)

_, eigvecs = torch.symeig(cov(ODhat.T), eigenvectors=True)
# _, eigvecs = torch.symeig(cov(ODhat.T), eigenvectors=True)
_, eigvecs = torch.linalg.eigh(cov(ODhat.T), UPLO='U')
eigvecs = eigvecs[:, [1, 2]]

HE = self.__find_HE(ODhat, eigvecs, alpha)
Expand Down

0 comments on commit 7c2a95f

Please sign in to comment.