Linfeng-Tang / SeAFusion

The code of " Image fusion in the loop of high-level vision tasks: A semantic-aware real-time infrared and visible image fusion network"
MIT License
184 stars 34 forks source link

FusionNet.py中测试用例的错误 #23

Closed SunHui1216 closed 3 months ago

SunHui1216 commented 11 months ago

您好,在该py文件下的测试代码如下: def unit_test(): import numpy as np x = torch.tensor(np.random.rand(2,4,480,640).astype(np.float32)) model = FusionNet(output=1) y = model(x) print('output shape:', y.shape) assert y.shape == (2,1,480,640), 'output shape (2,1,480,640) is expected!' print('test ok!') 在运行后会报错:TypeError: forward() missing 1 required positional argument: 'image_ir' 请问原因是否为您这里的测试输入是错误的? 感谢回答!

Linfeng-Tang commented 11 months ago

非常抱歉 这个测试代码是我们前一个版本使用的 要对现在的FusionNet进行测试你需要定义两个输入 即一个红外图像和一个可见光图像。

SunHui1216 commented 11 months ago

感谢您的回复!