Fast-SCNN icon indicating copy to clipboard operation
Fast-SCNN copied to clipboard

dimension problem

Open ashergaga opened this issue 5 years ago • 2 comments

Do someone know how to solve this problem?---- "File "models/fast_scnn.py", line 149, in forward x = torch.add(high_res_input, low_res_input) RuntimeError: The size of tensor a (90) must match the size of tensor b (92) at non-singleton dimension 2"

ashergaga avatar Jul 08 '19 03:07 ashergaga

Hi, I also met the similar problem. I think the problem is caused by upsampling by 4,which makes the two sizes not match. I just used low_res_input = F.interpolate(input=low_res_input, size=high_res_input.size()[2:4], mode='bilinear', align_corners=True)

Euphoria16 avatar Jan 31 '20 18:01 Euphoria16

Hi, I also met the similar problem. I think the problem is caused by upsampling by 4,which makes the two sizes not match. I just used low_res_input = F.interpolate(input=low_res_input, size=high_res_input.size()[2:4], mode='bilinear', align_corners=True)

Euphoria16 avatar Jan 31 '20 18:01 Euphoria16