Gather :param ctx: :param features: features of points, FloatTensor[B, C, N] :param indices: centers' indices in points, IntTensor[b, m] :return: centers_coords: coordinates of sampled centers, FloatTensor[B, C, M]
(ctx, features, indices)
| 10 | class Gather(Function): |
| 11 | @staticmethod |
| 12 | def forward(ctx, features, indices): |
| 13 | """ |
| 14 | Gather |
| 15 | :param ctx: |
| 16 | :param features: features of points, FloatTensor[B, C, N] |
| 17 | :param indices: centers' indices in points, IntTensor[b, m] |
| 18 | :return: |
| 19 | centers_coords: coordinates of sampled centers, FloatTensor[B, C, M] |
| 20 | """ |
| 21 | features = features.contiguous() |
| 22 | indices = indices.int().contiguous() |
| 23 | ctx.save_for_backward(indices) |
| 24 | ctx.num_points = features.size(-1) |
| 25 | return _backend.gather_features_forward(features, indices) |
| 26 | |
| 27 | @staticmethod |
| 28 | def backward(ctx, grad_output): |
nothing calls this directly
no outgoing calls
no test coverage detected