Hi, when I was implementing the pytorch model in the class U_net, I found that with some values of input size (for example 700x700), there could be a problem inside
d5 = torch.cat((e4, d5), dim=1)
where e4 and d5 may not be the same size, instead they will be different only with one. I guess is with the up conv that in some covs the calculate of size is using int(), some are larger than .5 so it increase 1.
For people who want to solve this quick, I recommend to change the size to (400,400) or (800,800) which will work
Thanks for clarifying for others about this issue.
It's because when you go deep in the network, it tries to divide in multiples of 2. So if you go 4 layers deep, that has to be divisible by 16.
Hi, when I was implementing the pytorch model in the class U_net, I found that with some values of input size (for example 700x700), there could be a problem inside
where e4 and d5 may not be the same size, instead they will be different only with one. I guess is with the up conv that in some covs the calculate of size is using int(), some are larger than .5 so it increase 1.