python - AttributeError: module 'torch.fft' has no attribute ...
stackoverflow.com › questions › 69115115Sep 09, 2021 · import torch.fft f = torch.fft.fftfreq (4) a = torch.fft.fftshift (f) print (a) and got the error. AttributeError: module 'torch.fft' has no attribute 'fftfreq'. I tried pip torch==1.7.0+cu110 and pip torch==1.7.1+cu110 and also conda pytorch==1.7.1 with cudatoolkit=11.0. Others have the same problem https://discuss.pytorch.org/t/unable-to-use-correctly-the-new-torch-fft-module/104560/6 But changing to torch1.7.0 didn't solve the problem.