zonasw / unet-nested-multiple-classification

This repository contains code for a multiple classification image segmentation model based on UNet and UNet++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

lijianqing317 opened this issue · comments

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

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

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...