Skip to content
Snippets Groups Projects
Commit 5ff3ab8a authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Assert float().cuda().contiguous() in both forward/backward projection

parent c86d4e6e
Branches
No related merge requests found
......@@ -36,7 +36,7 @@ class _ForwardProjection(torch.autograd.Function):
self.step_size = step_size
def forward(self, volume):
volume = volume.cuda().contiguous()
volume = volume.float().cuda().contiguous()
projection = torch.zeros(self.projection_shape,
device='cuda',
requires_grad=volume.requires_grad)
......@@ -55,6 +55,7 @@ class _ForwardProjection(torch.autograd.Function):
def backward(self, *projection_grad):
projection_grad = projection_grad[0]
projection_grad = projection_grad.float().cuda().contiguous()
volume_grad = torch.zeros(self.volume_shape, device='cuda', requires_grad=projection_grad.requires_grad)
assert pyronn_torch.cpp_extension
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment