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

How to train 224*224 images #6

Open
yongZheng1723 opened this issue Mar 4, 2022 · 3 comments
Open

How to train 224*224 images #6

yongZheng1723 opened this issue Mar 4, 2022 · 3 comments

Comments

@yongZheng1723
Copy link

If I want to run 224*224 images, what parameters should I change in config.py when I choose vitb16 or SWIN_W7_224?

@chou141253
Copy link
Owner

About vitb16, you should change

parser.add_argument("--use_layers",
and
default=[True, True, True, True], type=list)
, because of the difference of the number of blocks.
Swin-T should be fine.
if you have any questions, please let me know, thanks.

@yongZheng1723
Copy link
Author

Thanks for your answer, but when I run swin-t_win7_224,I changed line 234 of Swinvit12.py to self.extractor = timm.create_model('swin_large_patch4_window7_224_in22k', pretrained=True)

The following problems were encountered:RuntimeError: Given groups=1, weight of size [576, 144, 1], expected input[4, 49, 1536] to have 144 channels, but got 49 channels instead
What do I need to do next?

@chou141253
Copy link
Owner

Hi, do you replace folder timm/ to our timm/ folder (for ViT or Swin-T)?

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