LeeJunHyun / Image_Segmentation

Pytorch implementation of U-Net, R2U-Net, Attention U-Net, and Attention R2U-Net.
2.68k stars 595 forks source link

input size #33

Closed ykeivn closed 4 years ago

ykeivn commented 5 years ago

Thanks for you sharing. I want to know shouldn't the input of the image be of any size?And I modified the file of data_loader,but I got this error: d4 = torch.cat((x3,d4),dim=1) RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 24 and 25 in dimension 2 at /opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THC/generic/THCTensorMath.cu:71 Please help me.

Abe404 commented 5 years ago

I had a similar problem and was able to fix it by changing my image patch size from 572x572 to 576x576. Try making your patch size divisible by 16

LeeJunHyun commented 5 years ago

Hi, all. At first, I am sorry to make you confused. Could you please try batch size 1 ?

davidhuangal commented 4 years ago

@ykeivn Did you find a fix to this?