Closed chenwinkk closed 1 year ago
不太确定您是否对代码进行了更改,在models/yolo.py line 141理应是self.m[i]而非self.mi
可以再git clone最新版的试试
谢谢您!! 还有我想请教一下就是为什么大佬您代码跑出来的psnr和ssim指标比原论文高这么多呀
谢谢您!! 还有我想请教一下就是为什么大佬您代码跑出来的psnr和ssim指标比原论文高这么多呀
可能是很多细节堆起来的吧,其实我们也没针对性做太多精度上的优化
Traceback (most recent call last): File "D:\study\HMH\UnsupDIS-pytorch-main\UnsupDIS-pytorch-main\train.py", line 393, in
train(opt)
File "D:\study\HMH\UnsupDIS-pytorch-main\UnsupDIS-pytorch-main\train.py", line 254, in train
pred = model(imgs) # forward
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, kwargs)
File "D:\study\HMH\UnsupDIS-pytorch-main\UnsupDIS-pytorch-main\models\yolo.py", line 329, in forward
return self.model[-1](feature1, feature2, x2, m2)
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, *kwargs)
File "D:\study\HMH\UnsupDIS-pytorch-main\UnsupDIS-pytorch-main\models\yolo.py", line 141, in forward
off = self.mi.unsqueeze(-1) # [bs, 8, 1], for matrix multiplication
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "D:\anaconda\lib\site-packages\torch\nn\modules\container.py", line 141, in forward
input = module(input)
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\anaconda\lib\site-packages\torch\nn\modules\linear.py", line 103, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (2x51200 and 2048x512)
完全按照您的流程未作修改,却发现出现这个错误,weights使用的是yolov5x