当前位置:网站首页>OSV-q grd_ x=grd_ x[:, :, 0:-1, :]-data_ in[:, :, 1:, :]IndexError: too many indices for tensor of d
OSV-q grd_ x=grd_ x[:, :, 0:-1, :]-data_ in[:, :, 1:, :]IndexError: too many indices for tensor of d
2022-07-28 22:44:00 【Claire_ Shang】
input_net, target_net = Variable(batch[0]), Variable(batch[1], requires_grad=False) torch.Size([1, 3, 356, 356]) torch.Size([1, 3, 356, 356])
torch.Size([1, 3, 356, 356]) torch.Size([1, 3, 356, 356])
Traceback (most recent call last):
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 359, in <module>
train(opt)
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 286, in train
grd_x, grd_y = getGrd(img_in)
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 37, in getGrd
grd_x = grd_x[:, :, 0:-1, :] - data_in[:, :, 1:, :]
IndexError: too many indices for tensor of dimension 3
==>> Wed Mar 9 09:41:36 2022 [Iteration 1 Epoch 500] Loss = 12718.471680
==>> Wed Mar 9 09:41:36 2022 [Iter 1/8] loss = 12718.471680
====>> Wed Mar 9 09:41:36 2022 Pass time: 0:00:19.132388
Process finished with exit code 1Change to True
input_net, target_net = Variable(batch[0]), Variable(batch[1], requires_grad=True) torch.Size([1, 3, 356, 356]) torch.Size([1, 3, 356, 356])
==>> Wed Mar 9 09:27:59 2022 [Iteration 1 Epoch 500] Loss = 12005.107422
==>> Wed Mar 9 09:27:59 2022 [Iter 1/8] loss = 12005.107422
====>> Wed Mar 9 09:27:59 2022 Pass time: 0:00:20.932553
Traceback (most recent call last):
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 359, in <module>
train(opt)
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 286, in train
grd_x, grd_y = getGrd(img_in)
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 37, in getGrd
grd_x = grd_x[:, :, 0:-1, :] - data_in[:, :, 1:, :]
IndexError: too many indices for tensor of dimension 3
It seems different , But I don't know what's different
Decided to go from batch Functions are pushed up one by one
After trying many methods, I suddenly thought of a problem , Since it is all gradient function dimension error , The input image and network output dimensions are different , We define a new dimensional gradient function
Then this problem does not report an error, and the code goes forward one line , Bitter ......
==>> Wed Mar 9 11:11:56 2022 [Iter 1/8] loss = 8833.374023
====>> Wed Mar 9 11:11:56 2022 Pass time: 0:00:17.003332
Traceback (most recent call last):
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 361, in <module>
train(opt)
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 289, in train
lap = -(cmul(fft2(grd_x), cconj(fft2(grd_x), inplace=False)) + cmul(fft2(grd_y), cconj(fft2(grd_y), inplace=False)))
File "C:/Users/shang/Desktop/STDN_LI/TVGnet/OSV_q.py", line 138, in fft2
return torch.fft.fft2(t, 2)
AttributeError: 'builtin_function_or_method' object has no attribute 'fft2'
Process finished with exit code 1边栏推荐
- Find out the maximum value of all indicators in epoch [tips]
- How do we do full link grayscale on the database?
- UNET [basic network]
- PaddleNLP基于ERNIR3.0文本分类:WOS数据集为例(层次分类)
- 771. 字符串中最长的连续出现的字符
- SSH password free login
- es学习目录
- STM32 - DMA direct memory access controller (cubemx configures DMA)
- Idea generate class diagram plug-in UML (super detailed)
- Quadruped robot | gem (elevation map) + fast_ Deployment records of Leo (odometry) environment
猜你喜欢

Soft exam network engineer

Att & CK preliminary understanding

Using PCL to batch display PCD point cloud data flow

使用PCL批量将点云.bin文件转.pcd

ATT&CK初步了解
![[virtual machine _2]-hyper-v and vmware/virtualbox cannot coexist](/img/90/c481a817dc91d7e5247dd8e3ee1dae.png)
[virtual machine _2]-hyper-v and vmware/virtualbox cannot coexist

微信小程序剪切图片的功能

STM32 - DMA direct memory access controller (cubemx configures DMA)

Use PCL to batch convert point cloud.Bin files to.Pcd
![[connect set-top box] - use ADB command line to connect ec6108v9 Huawei Yuehe box wirelessly](/img/ab/624e9a3240416f8445c908378310ad.png)
[connect set-top box] - use ADB command line to connect ec6108v9 Huawei Yuehe box wirelessly
随机推荐
STM32 board level support package for keys
There will be a black line on the border when the button in the wechat applet is clicked
AWK空行过滤
Idea generate class diagram plug-in UML (super detailed)
WinForm jump to the second form case
STM32 - reset and clock control (cubemx for clock configuration)
770. Word replacement
ES6 concept
Binary source code, inverse code, complement code
Leetcode question brushing series - sum of majority type
CS flow [abnormal detection: normalizing flow]
STM32 -- program startup process
JS implementation generates a random key of specified length
Concise history of graphic technology
MKD [anomaly detection: knowledge disruption]
Anomaly detection summary: intensity_ based/Normalizing Flow
redis相关
STM32_ Hal library driven framework
MySQL command (add, delete, check and modify)
微信小程序使用canvas绘图,圆形头像,网络背景图,文字,虚线,直线