AttributeError: ‘builtin_function_or_method‘ object has no attribute ‘fftn‘
import torch
torch.fft.fftn(torch.Tensor(im2),(-2,-1))
上面的调用方式就会报错:
需要显式的引入torch.fft才行:
import torch.fft
torch.fft.fftn(torch.Tensor(im2),(-2,-1))
原创
2022-03-22 16:13:49 ·
2733 阅读 ·
0 评论