ReconFormer
ReconFormer copied to clipboard
Problem in data-consistency module
Hi,
Thank you for this great work. While using the repo, I came accross with a problem in data-consistency module. Below is a simple forward pass to the data-consistency module. The problem is in k-space transformation. I wanted to contribute to the repo with a PR addressing this problem. It may help those working on this repo.
import torch
from backbones.reconformer.reconformer import DataConsistencyInKspace
resolution = 320
device = 'cuda:0'
x = torch.randn((1, 2, resolution, resolution)).to(device)
k0 = torch.randn((1, 2, resolution, resolution)).to(device)
mask = torch.randn((1, 1, resolution, resolution)).to(device)
dc = DataConsistencyInKspace()
out = dc(x, k0, mask)
print(f"Input shape: {x.shape}")
print(f"Output shape: {out.shape}")
46 k0 = k0.permute(0, 2, 3, 1)
47 mask = mask.permute(0, 2, 3, 1)
...
--> 122 data = torch.fft.fft(data, 2, normalized=normalized)
123 data = fftshift(data, dim=(-3, -2))
124 return data
TypeError: fft_fft() got an unexpected keyword argument 'normalized'