Commit 6b0c170e authored by rusty1s's avatar rusty1s
Browse files

increase max_num_neighbors in case of no self-loops

parent b517279e
...@@ -112,7 +112,8 @@ def radius_graph(x, r, batch=None, loop=False, max_num_neighbors=32, ...@@ -112,7 +112,8 @@ def radius_graph(x, r, batch=None, loop=False, max_num_neighbors=32,
""" """
assert flow in ['source_to_target', 'target_to_source'] assert flow in ['source_to_target', 'target_to_source']
row, col = radius(x, x, r, batch, batch, max_num_neighbors + 1) row, col = radius(x, x, r, batch, batch,
max_num_neighbors if loop else max_num_neighbors + 1)
row, col = (col, row) if flow == 'source_to_target' else (row, col) row, col = (col, row) if flow == 'source_to_target' else (row, col)
if not loop: if not loop:
mask = row != col mask = row != col
......
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