jiexiaou / HomoFormer

19 stars 1 forks source link

张量大小不匹配 #4

Open SoluteToNight opened 1 month ago

SoluteToNight commented 1 month ago

test_M中合并图像时报错 The size of tensor a (219) must match the size of tensor b (384) at non-singleton dimension 3 File "/home/nemo/Downloads/HomoFormer/utils/image_utils.py", line 200, in mergeimage merge_img[:, :, hs:hs + crop_size, ws:ws + crop_size] += scoremap * simg File "/home/nemo/Downloads/HomoFormer/test_M.py", line 109, in <module> mergeimage(split_data, starts, crop_size=tile, resolution=(B, C, H, W))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: The size of tensor a (219) must match the size of tensor b (384) at non-singleton dimension 3

jiexiaou commented 3 weeks ago

你好,能提供一下测试的命令吗

SoluteToNight commented 2 weeks ago

python test_M.py --input_dir /home/nemo/Downloads/SRD --weights /home/nemo/Downloads/models/SRD.pth --arch HomoFormer --cal_metrics --result_ /home/nemo/Downloads/output --save_images --gpus 0 --repeat 1 --base_repeat 1SRD数据集