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

pytorch 1.8.1 has a problm: module ‘torch‘ has no attribute "rfft" #54

Open
Love-Sunshine opened this issue Oct 28, 2023 · 5 comments

Comments

@Love-Sunshine
Copy link

pytorch 1.8.1 has a problm: module ‘torch‘ has no attribute "rfft"

@Love-Sunshine
Copy link
Author

I use RTX 3090, the CUDA is 11.3

@joesharratt1229
Copy link

Since pytorch>1.7, there has been a redesign of the torch.fft interface. Fourier transform functions such torch.rfft() are now available under different function calls such as torch.fft.rfft(). Here is the documentation. The v2 branch of the torch radon library reflects these changes.

@Love-Sunshine
Copy link
Author

Thanks a lot.
When I install the v2, Another problem has occurred. As followed: "torch_radon_cuda" not found.
I find that "from torch_radon_cuda import *" is in "cuda_backend.py", but there is no "torch_radon_cuda.py", only "tr.py".

@LinY-ct
Copy link

LinY-ct commented Apr 16, 2024

ffted = torch.rfft(input, 1, onesided=False) to ffted = torch.view_as_real(torch.fft.fft(input, dim=1))
and
iffted = torch.irfft(time_step_as_inner, 1, onesided=False) to
iffted = torch.fft.irfft(torch.view_as_complex(time_step_as_inner), n=time_step_as_inner.shape[1], dim=1)

@Love-Sunshine
Copy link
Author

Okay, thank you very much. I'll give it a try.

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

No branches or pull requests

3 participants