MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / forward

Method forward

pointops2/functions/pointops2.py:50–61  ·  view source on GitHub ↗

input: input: (n, c), idx : (m, nsample) output: (m, nsample, c)

(ctx, input, idx)

Source from the content-addressed store, hash-verified

48class Grouping(Function):
49 @staticmethod
50 def forward(ctx, input, idx):
51 """
52 input: input: (n, c), idx : (m, nsample)
53 output: (m, nsample, c)
54 """
55 assert input.is_contiguous() and idx.is_contiguous()
56 m, nsample, n, c = idx.shape[0], idx.shape[1], input.shape[0], input.shape[1]
57 output = torch.cuda.FloatTensor(m, nsample, c)
58 pointops_cuda.grouping_forward_cuda(m, nsample, c, input, idx, output)
59 ctx.n = n
60 ctx.save_for_backward(idx)
61 return output
62
63 @staticmethod
64 def backward(ctx, grad_output):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected