运行test_reg.py出现RuntimeError: The size of tensor a (128) must match the size of tensor b (320) at non-singleton dimension 3
详细错误信息如下:
===> Starting Testing
Traceback (most recent call last):
File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 189, in
main(args)
File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 66, in main
test(net, test_data_loader, args.dst, device)
File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 86, in test
ir_pred, f_warp, flow, int_flow1, int_flow2, disp_pred = net(it, ir)
File "D:\Users\Anaconda3\envs\UMF_CMGR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "E:\UMF-CMGR\UMF-CMGR-main\models\deformable_net.py", line 106, in forward
features_swarped, = self.spatial_transform_f(c11, up_int_flow2) # torch.Size([16, 16, 128, 128])
File "D:\Users\Anaconda3\envs\UMF_CMGR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "E:\UMF-CMGR\UMF-CMGR-main\models\layers.py", line 124, in forward
new_locs = self.grid + flow
RuntimeError: The size of tensor a (128) must match the size of tensor b (320) at non-singleton dimension 3
运行test_reg.py出现RuntimeError: The size of tensor a (128) must match the size of tensor b (320) at non-singleton dimension 3 详细错误信息如下: ===> Starting Testing Traceback (most recent call last): File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 189, in
main(args)
File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 66, in main
test(net, test_data_loader, args.dst, device)
File "E:\UMF-CMGR\UMF-CMGR-main\Test\test_reg.py", line 86, in test
ir_pred, f_warp, flow, int_flow1, int_flow2, disp_pred = net(it, ir)
File "D:\Users\Anaconda3\envs\UMF_CMGR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "E:\UMF-CMGR\UMF-CMGR-main\models\deformable_net.py", line 106, in forward
features_swarped, = self.spatial_transform_f(c11, up_int_flow2) # torch.Size([16, 16, 128, 128])
File "D:\Users\Anaconda3\envs\UMF_CMGR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "E:\UMF-CMGR\UMF-CMGR-main\models\layers.py", line 124, in forward
new_locs = self.grid + flow
RuntimeError: The size of tensor a (128) must match the size of tensor b (320) at non-singleton dimension 3
Process finished with exit code 1
请问有高手能帮忙解决这个问题吗?