Skip to content

Commit

Permalink
Merge pull request #1845 from TangJiakai/master
Browse files Browse the repository at this point in the history
BUG FIX: dgcf.py
  • Loading branch information
Sherry-XLL authored Aug 30, 2023
2 parents 2accad5 + cefa30d commit 2c6f066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recbole/model/general_recommender/dgcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def _create_centered_distance(X):
r = torch.sum(X * X, dim=1, keepdim=True)
# (N, 1)
# (x^2 - 2xy + y^2) -> l2 distance between all vectors
value = r - 2 * torch.mm(X, X.T + r.T)
value = r - 2 * torch.mm(X, X.T) + r.T
zero_value = torch.zeros_like(value)
value = torch.where(value > 0.0, value, zero_value)
D = torch.sqrt(value + 1e-8)
Expand Down

0 comments on commit 2c6f066

Please sign in to comment.