Skip to content

Commit eb90610

Browse files
kit1980facebook-github-bot
authored andcommitted
Update deprecated PyTorch function in Captum
Differential Revision: D58169246
1 parent 03340ec commit eb90610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/helpers/influence/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def generate_symmetric_matrix_given_eigenvalues(
511511
D = len(eigenvalues)
512512
version = _parse_version(torch.__version__)
513513
if version < (1, 8):
514-
Q, _ = torch.qr(torch.randn((D, D)))
514+
Q, _ = torch.linalg.qr(torch.randn((D, D)))
515515
else:
516516
Q, _ = torch.linalg.qr(torch.randn((D, D)))
517517
return torch.matmul(Q, torch.matmul(torch.diag(torch.tensor(eigenvalues)), Q.T))

0 commit comments

Comments
 (0)