FBPFunctionGPU in leaptorch
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 249
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
How to solve this problem?The function is not correct.
class FBPFunctionGPU(torch.autograd.Function):
@staticmethod
def forward(ctx, input, proj, vol, param_id): # input: projection (sinogram), output: image
for batch in range(input.shape[0]):
f = vol[batch]
g = input[batch]
lct.fbp_gpu(g, f) # compute input (f) from proj (g)
ctx.save_for_backward(input, proj, param_id)
return vol
@staticmethod
def backward(ctx, grad_output): # grad_output: image, grad_input: projection (sinogram)
input, proj, param_id = ctx.saved_tensors
for batch in range(input.shape[0]):
f = grad_output[batch]
g = proj[batch]
lct.fbp_adjoint_gpu(g, f) # compute proj (g) from input (f) -> needs to be replaced!!!
return proj, None, None, None
What do I need to change to make this code correct?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FBPFunctionGPU forward and backward methods shown in the issue, then verify the expected autograd inputs and outputs for lct.fbp_gpu and lct.fbp_adjoint_gpu. Determine the correct adjoint operation and tensor handling before changing the implementation; done means the custom function computes the intended forward result and propagates correct gradients.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100