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

Method forward

pointops2/functions/pointops_ablation.py:106–116  ·  view source on GitHub ↗

input: input1: (n, c), input2: (n, c), idx: (n, nsample) output: (n, nsample, c)

(ctx, input1, input2, idx)

Source from the content-addressed store, hash-verified

104class Subtraction(Function):
105 @staticmethod
106 def forward(ctx, input1, input2, idx):
107 """
108 input: input1: (n, c), input2: (n, c), idx: (n, nsample)
109 output: (n, nsample, c)
110 """
111 assert input1.is_contiguous() and input2.is_contiguous()
112 n, c = input1.shape; nsample = idx.shape[-1]
113 output = torch.cuda.FloatTensor(n, nsample, c).zero_()
114 pointops_cuda.subtraction_forward_cuda(n, nsample, c, input1, input2, idx, output)
115 ctx.save_for_backward(idx)
116 return output
117
118 @staticmethod
119 def backward(ctx, grad_output):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected