当前位置:网站首页>Torch.fft.fft 2. () error reporting problem solution
Torch.fft.fft 2. () error reporting problem solution
2022-07-28 22:45:00 【Claire_ Shang】
Running someone else's source code also reports an error , So make sure it's not a code problem .

Asked someone , Should be fft Function corresponding torch Version of the problem ,torch1.8.0 After version
torch.fft.fft2According to the online summary, I changed it
# Old edition new edition
torch.rfft torch.fft.fft2
torch.irfft torch.fft.ifft2It's a mistake , The parameter definitions used in functions should also be different

It's not a version problem , notice pytorch There are only these two functions on the official website , So guess if I made a mistake


terms of settlement , Put the source code torch.fft.fft2 Change to torch.fft.fftn That's all right.
def D(x, Dh_DFT, Dv_DFT):
x_DFT = torch.fft.fftn(x, dim=(-2,-1)).cuda()
Dh_x = torch.fft.ifftn(Dh_DFT*x_DFT, dim=(-2,-1)).real
Dv_x = torch.fft.ifftn(Dv_DFT*x_DFT, dim=(-2,-1)).real
return Dh_x, Dv_xThen the code runs normally , To prove that the code really ran successfully , Because I don't know what happened recently , Start reporting the same mistakes as before , No reason found , But at least it worked , Then my change should be right .

边栏推荐
- PaddleNLP基于ERNIR3.0文本分类以中医疗搜索检索词意图分类(KUAKE-QIC)为例【多分类(单标签)】
- MKD [anomaly detection: knowledge disruption]
- es学习目录
- 使用PCL批量将点云.bin文件转.pcd
- 6K6w5LiA5qyh5pS75Ye75YiG5p6Q
- 使用PCL批量显示PCD点云数据流
- 776. String shift inclusion problem
- 842. 排列数字
- The blueprint of flask complements openpyxl
- 20-09-27项目迁移到阿里折腾记录(网卡顺序导致服务无法通过haproxy连接到db)
猜你喜欢

c语言实现字符串逆序排列

Concise history of graphic technology

Solve Jupiter: the term 'Jupiter' is not recognized as the name of a cmdlet, function, script file
![Draem+sspcab [anomaly detection: block]](/img/97/75ce235c2021b56007eecb82afe4b0.png)
Draem+sspcab [anomaly detection: block]

Idea generate class diagram plug-in UML (super detailed)

How to install WiFi correctly

STM32 -- program startup process

STM32 - external interrupt application (exti) (use cubemx to configure interrupts)

Paddlenlp text classification based on ernir3.0: take wos dataset as an example (hierarchical classification)

npm ERR code ETIMEDOUT npm ERR syscall connect npm ERR errno ETIMEDOUT npm ERR network reques...
随机推荐
NPM switch Taobao source (NPM source)
《结构学》介绍
Anomaly detection summary: intensity_ based/Normalizing Flow
Summary of recent bugs
fatal error: io. h: No such file or directory
ngx+sql环境离线安装日志(rpm安装)
Intelligent control -- fuzzy mathematics and control
STM32 - memory, I2C protocol
Ocr-gan [anomaly detection: Reconstruction Based]
MySQL command (add, delete, check and modify)
Using nodejs to operate MySQL
Common commands of NPM
STM32 board level support package for keys
775. 倒排单词
PC side special effects - animation function
[reprint] the token token is used in the login scenario
20-09-27 the project is migrated to Alibaba toss record (the network card order makes the service unable to connect to DB through haproxy)
Command line agent: proxychains configuration
770. Word replacement
c语言实现字符串逆序排列