Skip to content

Update __init__.py#12

Open
xmy0916 wants to merge 1 commit intogdlg:masterfrom
xmy0916:patch-1
Open

Update __init__.py#12
xmy0916 wants to merge 1 commit intogdlg:masterfrom
xmy0916:patch-1

Conversation

@xmy0916
Copy link

@xmy0916 xmy0916 commented Jul 6, 2022

Fix torch.rfft and torch.irfft import problems. Support both origin torch version and version 1.1.0

Fix torch.rfft and torch.irfft import problems. Support both origin torch version and version 1.1.0
from torch import rfft
except ImportError:
def rfft(x, d):
t = torch.fft.fft(x, dim=(-d))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Why using torch.fft.fft instead of torch.fft.rfft? The original code worked with real numbers, and when I tested it, I found that rfft was faster and used less memory than fft.

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

Successfully merging this pull request may close these issues.

2 participants