e-lab / LinkNet

166 stars 42 forks source link

Model fails for input size other than multiples of 32(for depth of 4) #15

Open Tharun98 opened 6 years ago

Tharun98 commented 6 years ago

Hi, If we give the input image size other than 32 multiples there is a size mismatch error when adding the output from encoder3 and decoder4. For example input image size is 1000x2000 output of encoder3 is 63x125 and decoder4 output size is 64x126. We need adjust parameters for spatialfullconvolution layer only if input image size is multiple of 2^(n+1) where n is encoder depth. For other image sizes adjust parameter depends on the image size. In this example network works if adjust parameter is zero in decoders 3 and 4. Please clarify if this network works only for 2^(n+1) sizes. Thanks.

sunstarchan commented 3 years ago

@Tharun98 Yes, the input size should be 32 multiples, as the network does 5 times down-samples and up-samples.