-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we change the U-net to fit any size of the input image? #32
Comments
Yes I know about this issue, I mention it in the README. It seems to me that there should be no problem when upsampling thanks to the padding, that cause the two sizes to match up in order to concat. But I think my padding implementation (https://github.com/milesial/Pytorch-UNet/blob/master/unet/unet_parts.py#L66) may be wrong. Check out the forks (https://github.com/milesial/Pytorch-UNet/network), some people have modified this part of the code, but I have not tested it. More specifically https://github.com/HaiyongJiang/U-Net-Pytorch-Unstructured-Buggy/commit/0e854509c2cea854e247a9c615f175f76fbb2e3a |
Ya, after deleting one of the ')' and switch diffX and diffY in HaiyongJiang's code. Everything works well. Thank you. |
I tried to input the U-net with different size of the input image. It seems that sometimes when the size number is odd, it will lead to some problem when we upsample, especially when we concat different Xi(x, x1, x2, x3, x4, x5). Is there some way we can change the U-net to fit any size of the input image? Thankyou.
The text was updated successfully, but these errors were encountered: