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

Unable to adapt to different resolution #12

Closed
KruskalLin opened this issue Jun 29, 2021 · 4 comments
Closed

Unable to adapt to different resolution #12

KruskalLin opened this issue Jun 29, 2021 · 4 comments

Comments

@KruskalLin
Copy link

KruskalLin commented Jun 29, 2021

Hi, thanks for your contribution. The model is unable to adapt to different resolutions except for 224 for both height and width. The error often occurs as

RuntimeError: shape '[xxx, xxx, xxx, xxx, xxx]' is invalid for input of size xxx
@weiaicunzai
Copy link

weiaicunzai commented Jun 29, 2021

HI, did you solve that? I have also encountered this problem

@KruskalLin
Copy link
Author

No. However, the Swin model itself requires an input size of 224. It also cannot adapt to resolutions other than 224. I choose to crop the original image for training.

@weiaicunzai
Copy link

No. However, the Swin model itself requires an input size of 224. It also cannot adapt to resolutions other than 224. I choose to crop the original image for training.

Ok, thanks for your replay.

@dichen-cd
Copy link

Hi @KruskalLin, you may try other resolutions that are dividable by 28 (patch_size=4 * window_size=7) such as 252, 280, 308, 336, etc.

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

3 participants