From cfa5fc8489f031284ea40916b60b6ef272b3a0bf Mon Sep 17 00:00:00 2001 From: MeowZheng Date: Sun, 7 Nov 2021 22:49:48 +0800 Subject: [PATCH] [Doc] Fix invalid symbols in docstring --- mmcv/ops/correlation.py | 8 ++++---- mmcv/ops/group_points.py | 2 +- mmcv/ops/points_sampler.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mmcv/ops/correlation.py b/mmcv/ops/correlation.py index 86dab432c..2e0a8953e 100644 --- a/mmcv/ops/correlation.py +++ b/mmcv/ops/correlation.py @@ -118,20 +118,20 @@ class Correlation(nn.Module): There are two batched tensors with shape :math:`(N, C, H, W)`, and the correlation output's shape is - :math:`(N, \text{max_displacement} \times 2+1, - \text{max_displacement} \times 2+1, + :math:`(N, \text{max\_displacement} \times 2+1, + \text{max\_displacement} \times 2+1, H_{out}, W_{out})` where .. math:: H_{out} = \left\lfloor\frac{H_{in} + 2 \times \text{padding} - - \text{dilation} \times (\text{kernel_size} - 1) - 1} + \text{dilation} \times (\text{kernel\_size} - 1) - 1} {\text{stride}} + 1\right\rfloor .. math:: W_{out} = \left\lfloor\frac{W_{in} + 2 \times \text{padding} - - \text{dilation} \times (\text{kernel_size} - 1) - 1} + \text{dilation} \times (\text{kernel\_size} - 1) - 1} {\text{stride}} + 1\right\rfloor the correlation item :math:`(N_i, dy, dx)` is formed by taking the sliding diff --git a/mmcv/ops/group_points.py b/mmcv/ops/group_points.py index 5afd22794..aa135825e 100644 --- a/mmcv/ops/group_points.py +++ b/mmcv/ops/group_points.py @@ -71,7 +71,7 @@ class QueryAndGroup(nn.Module): center_xyz (Tensor): (B, npoint, 3) coordinates of the centriods. features (Tensor): (B, C, N) Descriptors of the features. - Return: + Return: Tensor: (B, 3 + C, npoint, sample_num) Grouped feature. """ # if self.max_radius is None, we will perform kNN instead of ball query diff --git a/mmcv/ops/points_sampler.py b/mmcv/ops/points_sampler.py index 74f5b4f60..201131285 100644 --- a/mmcv/ops/points_sampler.py +++ b/mmcv/ops/points_sampler.py @@ -95,7 +95,7 @@ class PointsSampler(nn.Module): points_xyz (Tensor): (B, N, 3) xyz coordinates of the features. features (Tensor): (B, C, N) Descriptors of the features. - Return: + Return: Tensor: (B, npoint, sample_num) Indices of sampled points. """ indices = [] @@ -166,7 +166,7 @@ class FSSampler(nn.Module): super().__init__() def forward(self, points, features, npoint): - """Sampling points with FS_Sampling.""" + r"""Sampling points with FS\_Sampling.""" assert features is not None, \ 'feature input to FS_Sampler should not be None' ffps_sampler = FFPSSampler()