Pytorch older version for torch.rfft and torch.irfft

I am currently using PyTorch version 1.11.0 with CUDA version 11.3. I am trying to integrate a Wiener filter (the new version supports torch.fft.rfft and torch.fft.irfft) into my deep learning model, but the code for the filter is written in an older version of PyTorch that supports torch.rfft and torch.irfft. To use this code, I downgraded my PyTorch and CUDA versions to 1.6.0 and 10.2, respectively.

However, when I run the code or try to debug it, the execution gets stuck and does not proceed. I am looking for help to identify and resolve the issue. Any assistance would be greatly appreciated. Thank you.

Hi,

These functions were simply migrated to torch.fft.* namespace.
If you can update the library code to use these new torch.fft.rfft() function that should work.
If you can’t, you can also add the function back by hand by doing something like torch.rfft = torch.fft.rfft as a workaround.

Thank you for the suggestion. I will attempt to follow your advice. :+1: