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

Method forward

pointops2/functions/pointops.py:54–65  ·  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

52class 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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected