I need to run the code that was written for the old version of PyTorch. I have version 1.9. Starting from version 1.8, PyTorch introduced the functions torch.fft.rfft() and torch.fft.irfft(), which work differently from the old torch.rfft() and torch.irfft(). I couldn't figure out how to replace these functions so that this code works exactly the same as on the old version:
version 1.8:
fU = torch.rfft( u, 1, onesided=False)
U = torch.irfft(fU, 1, onesided=False)
torch.fft(x, x.ndim)
Please help me