Commit 69fada5e authored by rusty1s's avatar rusty1s
Browse files

graclus fix

parent baba7c7a
...@@ -63,7 +63,7 @@ tests_require = ['pytest', 'pytest-cov'] ...@@ -63,7 +63,7 @@ tests_require = ['pytest', 'pytest-cov']
setup( setup(
name='torch_cluster', name='torch_cluster',
version='1.5.0', version='1.5.1',
author='Matthias Fey', author='Matthias Fey',
author_email='matthias.fey@tu-dortmund.de', author_email='matthias.fey@tu-dortmund.de',
url='https://github.com/rusty1s/pytorch_cluster', url='https://github.com/rusty1s/pytorch_cluster',
......
...@@ -3,7 +3,7 @@ import os.path as osp ...@@ -3,7 +3,7 @@ import os.path as osp
import torch import torch
__version__ = '1.5.0' __version__ = '1.5.1'
expected_torch_version = (1, 4) expected_torch_version = (1, 4)
try: try:
......
...@@ -33,7 +33,7 @@ def graclus_cluster(row: torch.Tensor, col: torch.Tensor, ...@@ -33,7 +33,7 @@ def graclus_cluster(row: torch.Tensor, col: torch.Tensor,
num_nodes = max(int(row.max()), int(col.max())) + 1 num_nodes = max(int(row.max()), int(col.max())) + 1
# Remove self-loops. # Remove self-loops.
mask = row == col mask = row != col
row, col = row[mask], col[mask] row, col = row[mask], col[mask]
if weight is not None: if weight is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment