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

Runtime error: The size of tensor a (275) must match the size of tensor b (276) at non-singleton dimension 3 #28

Closed
cherrysherryplus opened this issue Apr 21, 2022 · 1 comment

Comments

@cherrysherryplus
Copy link

When one of the input image's resolution (width or height) is not divisiable by 8 (or the downsampling rate in the AER-Net forward process), the error happens.


The error message

image

The input clear image (550 x 975)

1714

Should I do some resize or crop work with my own dataset both when training and testing? What should I do to make images with random size as a legal input?

Thanks a lot.

@cherrysherryplus cherrysherryplus changed the title Runtime error: Runtime error: The size of tensor a (275) must match the size of tensor b (276) at non-singleton dimension 3 Apr 21, 2022
@cherrysherryplus
Copy link
Author

# The difference between x_down2 and x_up1 causes the error
input haze size: (550, 975)
x_down2 haze size: torch.Size([1, 128, 488, 275])
x_up1 haze size: torch.Size([1, 128, 488, 276])

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

1 participant