Unverified Commit aa9ab1d2 authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

Merge pull request #74 from aicentral/patch-1

Update knn.py
parents 75216b3c 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)
""" """
......
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