Skip to content

TypeError: fft_rfft() got an unexpected keyword argument 'onesided' #14

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

Open
turmeric-blend opened this issue Apr 21, 2021 · 2 comments

Comments

@turmeric-blend
Copy link

Hi, thanks for the open source code.

For pytorch 1.8.0, its required to use torch.fft.rfft() and torch.fft.irfft() instead of torch.rfft()/torch.irfft(). For the newer versions, there is no onesided argument. How do I update the code for fft to work for pytorch 1.8.0? Thanks.

@zotko
Copy link

zotko commented Sep 23, 2021

Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.rfft() for one-sided output, or torch.fft.fft() for two-sided output (see link)

@Sudo42b
Copy link

Sudo42b commented Nov 1, 2021

Edit
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)

wdoppenberg pushed a commit to wdoppenberg/StemGNN that referenced this issue May 19, 2022
lourdesLB added a commit to lourdesLB/StemGNN that referenced this issue Sep 25, 2024
- Added script for cluster execution: `run_experiment_gpu.sh`.
- Updated dependencies in `requirements.txt` to ensure compatibility with available CUDA versions.
- Refactored `base_model.py` to align with the current PyTorch version*.
- Improved printing and logging during model training in `handler.py`.

*Note: Updated Fourier transform functions as per issue microsoft#14 (microsoft#14).
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