unet-nested-multiple-classification icon indicating copy to clipboard operation
unet-nested-multiple-classification copied to clipboard

RuntimeError: Sizes of tensors must match except in dimension 2. Got 74 and 75 (The offending index is 0)

Open lijianqing317 opened this issue 5 years ago • 2 comments

运行时报这种错,是需要训练集中各个图像的size必须一致吗?

lijianqing317 avatar Aug 19 '20 05:08 lijianqing317

可能是由于输入的图像尺寸在不同的卷积操作之后变得尺寸不一样,我原来的图像是700700就报错,但把输入的图像统一resize成256256之后就可以了

stellating avatar Nov 06 '20 14:11 stellating

I get a similar error (see below), when I try to run it on images of the input size 1080x3840. Does this Unet only accept quadratic input shapes or how can I avoid this error? Thanks in advance

RuntimeError: Sizes of tensors must match except in dimension 2. Got 134 and 135 (The offending index is 0)

I also rescaled my images and masks to a multiple of 16, but got the same error...

FilippoHei avatar Jun 04 '21 10:06 FilippoHei