Open kit1980 opened 2 years ago
You are computing the eigenvalues and eigenvectors of Y.mT @ Y
. As you can see in [here], that's equivalent to selecting the right singular factors of the SVD decomposition, and taking the square root of the singular values. As such, that code can be rewritten as:
_, S, HT = linalg.svd(Y)
H = HT.mT
eig_values = (S ** 2) / nexp
modulo perhaps a reordering of the eig_values
.
PyTorch's torch.eig was deprecated since version 1.9 and is being removed by https://github.com/pytorch/pytorch/pull/70982. Please use the
torch.linalg.eig
function instead if you want your code to continue to work with the latest PyTorch.Affected file: https://github.com/facebookresearch/DONERF/blob/18b328c21a720323b5e178ef27ad8aacb6680671/src/util/IW_SSIM_PyTorch.py#L221