Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
8a467e8c
Unverified
Commit
8a467e8c
authored
Jul 08, 2020
by
Ahmed Ibrahim
Committed by
GitHub
Jul 08, 2020
Browse files
Update knn.py
Fix a bug in the example code inside the knn function
parent
75216b3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_cluster/knn.py
torch_cluster/knn.py
+1
-1
No files found.
torch_cluster/knn.py
View file @
8a467e8c
...
@@ -42,7 +42,7 @@ def knn(x: torch.Tensor, y: torch.Tensor, k: int,
...
@@ -42,7 +42,7 @@ def knn(x: torch.Tensor, y: torch.Tensor, k: int,
x = torch.Tensor([[-1, -1], [-1, 1], [1, -1], [1, 1]])
x = torch.Tensor([[-1, -1], [-1, 1], [1, -1], [1, 1]])
batch_x = torch.tensor([0, 0, 0, 0])
batch_x = torch.tensor([0, 0, 0, 0])
y = torch.Tensor([[-1, 0], [1, 0]])
y = torch.Tensor([[-1, 0], [1, 0]])
batch_
x
= torch.tensor([0, 0])
batch_
y
= torch.tensor([0, 0])
assign_index = knn(x, y, 2, batch_x, batch_y)
assign_index = knn(x, y, 2, batch_x, batch_y)
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment