input: grad_out: (n, nsample, c) output: grad_input1: (n, c), grad_input2: (n, c)
(ctx, grad_output)
| 708 | |
| 709 | @staticmethod |
| 710 | def backward(ctx, grad_output): |
| 711 | """ |
| 712 | input: grad_out: (n, nsample, c) |
| 713 | output: grad_input1: (n, c), grad_input2: (n, c) |
| 714 | """ |
| 715 | idx, = ctx.saved_tensors |
| 716 | n, nsample, c = grad_output.shape |
| 717 | grad_input1 = torch.cuda.FloatTensor(n, c).zero_() |
| 718 | grad_input2 = torch.cuda.FloatTensor(n, c).zero_() |
| 719 | pointops_cuda.subtraction_backward_cuda(n, nsample, c, idx, grad_output, grad_input1, grad_input2) |
| 720 | return grad_input1, grad_input2, None |
| 721 | |
| 722 | subtraction = Subtraction.apply |
| 723 |
nothing calls this directly
no outgoing calls
no test coverage detected