UMF-CMGR
UMF-CMGR copied to clipboard
RuntimeError: The size of tensor a (128) must match the size of tensor b (236) at non-singleton dimension 3
你好,我当我运行test_reg.py时报这个错误,然后我去查看了报错位置, File "../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 (236) at non-singleton dimension 3 然后我查看了flow是[1,2,170,236] grid是[1,2,128,128] 我想问下这个问题怎么解决呢?
你把测试图片resize成256*256就可以了,或者保证你的图像的宽和高能被2^3整除
好的 谢谢~
你好 我把图片resize后还是报同样的错误
你好 我把图片resize后还是报同样的错误
请问解决了吗?