"git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "e4d218653b4143a7bd7cc11d88c88528be473aad"
Commit fe19ac06 authored by rusty1s's avatar rusty1s
Browse files

improve doc

parent 6917134d
...@@ -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
......
...@@ -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`
......
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