unet
unet copied to clipboard
Got an error when training on different sizes images.
Error Message:
ValueError: A Concatenate
layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 25, 25, 512), (None, 24, 24, 512)]
Obviously, there's a structure problem.
This might be because u-net architecture consists of contracting path(conv, max pooling) and expansion path (upsampling, concatenation), when we down sample image of shape [(None,25,25,512)] we will get [None,12,12,512], on other hand when we upsample image and concate we will det [None,24,24,512].
So resize input image according to architecture needs.
Hi, If the raw image is much larger than 512*512, how can resize the image for the requirement of the code?