input: input: (n, c), idx : (m, nsample) output: (m, nsample, c)
(ctx, input, idx)
| 52 | class Grouping(Function): |
| 53 | @staticmethod |
| 54 | def forward(ctx, input, idx): |
| 55 | """ |
| 56 | input: input: (n, c), idx : (m, nsample) |
| 57 | output: (m, nsample, c) |
| 58 | """ |
| 59 | assert input.is_contiguous() and idx.is_contiguous() |
| 60 | m, nsample, n, c = idx.shape[0], idx.shape[1], input.shape[0], input.shape[1] |
| 61 | output = torch.cuda.FloatTensor(m, nsample, c) |
| 62 | pointops_cuda.grouping_forward_cuda(m, nsample, c, input, idx, output) |
| 63 | ctx.n = n |
| 64 | ctx.save_for_backward(idx) |
| 65 | return output |
| 66 | |
| 67 | @staticmethod |
| 68 | def backward(ctx, grad_output): |
nothing calls this directly
no outgoing calls
no test coverage detected