Skip to content

Commit

Permalink
upper=False
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Jankowiak committed Jan 23, 2025
1 parent 105cae8 commit dab7954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions millipede/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def safe_cholesky(A, epsilon=1.0e-8):
if A.shape == (1, 1):
return A.sqrt()
try:
return torch.linalg.cholesky(A)
return torch.linalg.cholesky(A, upper=False)
except RuntimeError as e:
Aprime = A.clone()
jitter_prev = 0.0
Expand All @@ -29,7 +29,7 @@ def safe_cholesky(A, epsilon=1.0e-8):
Aprime.diagonal(dim1=-2, dim2=-1).add_(jitter_new - jitter_prev)
jitter_prev = jitter_new
try:
return torch.linalg.cholesky(Aprime)
return torch.linalg.cholesky(Aprime, upper=False)
except RuntimeError:
continue
raise e
Expand Down

0 comments on commit dab7954

Please sign in to comment.