Skip to content

Commit

Permalink
increase numerical tolerance (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mberr authored Jun 21, 2022
1 parent 28a33ed commit 8de471b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torch_ppr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def validate_adjacency(adj: torch.Tensor, n: Optional[int] = None):
else:
# hotfix until torch.sparse.sum is implemented
adj_sum = adj.t() @ torch.ones(adj.shape[0])
if not torch.allclose(adj_sum, torch.ones_like(adj_sum)):
if not torch.allclose(adj_sum, torch.ones_like(adj_sum), rtol=1.0e-04):
raise ValueError(f"Invalid column sum: {adj_sum}. expected 1.0")


Expand Down

0 comments on commit 8de471b

Please sign in to comment.