Skip to content
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

output size does not match input size when padding=True #2

Closed
yi-li-yang opened this issue Jan 22, 2019 · 1 comment
Closed

output size does not match input size when padding=True #2

yi-li-yang opened this issue Jan 22, 2019 · 1 comment

Comments

@yi-li-yang
Copy link

Hi, I input a image (1646,1646) into the unet, and assigned padding=True, but the output is (1632,1632), may I ask why and how to make the size unified?

@jvanvugt
Copy link
Owner

It is because the input sizes are divided by 2 (and floored) in each pooling layer. 1646 is divisible by 2 only once. You should either crop or pad your input images such that they are a multiple of 2^(depth-1). By the way 1646 is already ridiculously large. It might be a good idea to downsample or train on crops of the original image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants