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
fe19ac06
"git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "e4d218653b4143a7bd7cc11d88c88528be473aad"
Commit
fe19ac06
authored
Mar 03, 2021
by
rusty1s
Browse files
improve doc
parent
6917134d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
README.md
README.md
+1
-0
torch_cluster/nearest.py
torch_cluster/nearest.py
+4
-2
No files found.
README.md
View file @
fe19ac06
...
@@ -218,6 +218,7 @@ tensor([[1, 2, 0, 3, 0, 3, 1, 2],
...
@@ -218,6 +218,7 @@ tensor([[1, 2, 0, 3, 0, 3, 1, 2],
### Nearest
### Nearest
Clusters points in
*x*
together which are nearest to a given query point in
*y*
.
Clusters points in
*x*
together which are nearest to a given query point in
*y*
.
`batch_{x,y}`
vectors need to be sorted.
```
python
```
python
import
torch
import
torch
...
...
torch_cluster/nearest.py
View file @
fe19ac06
...
@@ -17,10 +17,12 @@ def nearest(x: torch.Tensor, y: torch.Tensor,
...
@@ -17,10 +17,12 @@ def nearest(x: torch.Tensor, y: torch.Tensor,
:math:`\mathbf{Y} \in \mathbb{R}^{M \times F}`.
:math:`\mathbf{Y} \in \mathbb{R}^{M \times F}`.
batch_x (LongTensor, optional): Batch vector
batch_x (LongTensor, optional): Batch vector
:math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^N`, which assigns each
:math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^N`, which assigns each
node to a specific example. (default: :obj:`None`)
node to a specific example. :obj:`batch_x` needs to be sorted.
(default: :obj:`None`)
batch_y (LongTensor, optional): Batch vector
batch_y (LongTensor, optional): Batch vector
:math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^M`, which assigns each
:math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^M`, which assigns each
node to a specific example. (default: :obj:`None`)
node to a specific example. :obj:`batch_y` needs to be sorted.
(default: :obj:`None`)
:rtype: :class:`LongTensor`
:rtype: :class:`LongTensor`
...
...
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