I have a symmetric, sparse, tensor (which is a matrix) and use torch.symeig to find eigen-values and eigen-vectors of it as follow:
eig_val, eig_vec = torch.symeig(input.to_dense(), eigenvectors=True)

When I tried to reconstruct the original tensor by using the formula $input = U\Lambda U^T$
input_recons = eig_vec*torch.diag(eig_val)*torch.t(eig_vec)

But the input_recons is so different from the input and I don’t know why.