Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct shape of weights #47

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

ckolbPTB
Copy link
Contributor

@ckolbPTB ckolbPTB commented Jan 3, 2022

I tried to provide weights to calc_toeplitz_kernel running this script:

import torch
import torchkbnufft as tkbn

image = torch.randn(1,1,8,8) + 1j * torch.randn(1,1,8,8)
omega = torch.rand(2,12)
weights = torch.ones(1,12)
toep_ob = tkbn.ToepNufft()
kernel = tkbn.calc_toeplitz_kernel(omega, im_size=[8,8], weights=weights)
image = toep_ob(image, kernel)

but it failed, because the dimensions of weights are not correctly adapted in calc_one_batch_toeplitz_kernel. This pull request should fix this.

Copy link
Owner

@mmuckley mmuckley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the contribution @ckolbPTB!

@mmuckley mmuckley merged commit 95973c1 into mmuckley:main Jan 10, 2022
mmuckley pushed a commit that referenced this pull request Nov 22, 2022
Co-authored-by: Christoph Kolbitsch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants