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

Method backward

pointops2/functions/pointops2.py:202–212  ·  view source on GitHub ↗

input: xyz: (m, 3), new_xyz: (n, 3), input: (m, c), offset: (b), new_offset: (b) output: (n, c)

(ctx, grad_output)

Source from the content-addressed store, hash-verified

200
201 @staticmethod
202 def backward(ctx, grad_output):
203 """
204 input: xyz: (m, 3), new_xyz: (n, 3), input: (m, c), offset: (b), new_offset: (b)
205 output: (n, c)
206 """
207 m, k = ctx.m, ctx.k
208 idx, weight = ctx.saved_tensors
209 n, c = grad_output.shape
210 grad_input = torch.cuda.FloatTensor(m, c).zero_()
211 pointops_cuda.interpolation_backward_cuda(n, c, k, grad_output, idx, weight, grad_input)
212 return None, None, grad_input, None, None, None
213
214interpolation2 = Interpolation.apply

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected