当前位置:网站首页>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 .

边栏推荐
- imx6q gpio复用
- Use PCL to batch convert point cloud.Bin files to.Pcd
- Detection and tracking evaluation index
- Log4j vulnerability elk platform processing method (logstah5.5.1)
- JVM -- custom class loader
- For loops and functions
- 842. 排列数字
- Install PCL and VTK under the background of ROS installation, and solve VTK and PCL_ ROS conflict problem
- PHP库neo4j怎么安装及使用
- PaddleNLP基于ERNIR3.0文本分类以CAIL2018-SMALL数据集罪名预测任务为例【多标签】
猜你喜欢

Install PCL and VTK under the background of ROS installation, and solve VTK and PCL_ ROS conflict problem

【三维目标检测】3DSSD(一)

基于Ernie-3.0 CAIL2019法研杯要素识别多标签分类任务

MySQL installation and configuration (super detailed, simple and practical)

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

STM32 - Basic timer (tim6, tim7) working process, interpretation function block diagram, timing analysis, cycle calculation
![Labelme labels circular objects [tips]](/img/da/5790d814168b23321ab00a1d17189f.png)
Labelme labels circular objects [tips]

JVM -- custom class loader

imx6q gpio复用

Stm32+ four pin OLED screen + Chinese character mold taking
随机推荐
Why doesn't the icon on the elment plus icon input display
CFA [anomaly detection: embedded_based]
Use PCL to batch convert point cloud.Bin files to.Pcd
How to use sprintf function
职场pua但有道理
Imx6q GPIO multiplexing
XXX port is already in use
Redis related
Excel-vba quick start (XIII. Common usage of date)
ES6 concept
使用PCL批量将点云.bin文件转.pcd
容器化配置启动redis集群 单机6节点 3主3从
PC side web page special effects (offset series, obtain the coordinates of the mouse in the box, pop-up drag effect, magnifying glass effect)
Qt+ffmpeg environment construction
JS implementation generates a random key of specified length
es个人整理的相关面试题
STM32CUBEIDE(10)----ADC在DMA模式下扫描多个通道
Summary of common error types in JS
微信小程序剪切图片的功能
How to install and use PHP library neo4j