-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Adding the huge vision transformer from SWAG #5721
Merged
Merged
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c801bf0
Add vit_b_16_swag
YosuaMichael 9e13f79
Better handling idiom for image_size, edit test_extended_model to han…
YosuaMichael 1707171
Update the accuracy to the experiment result on torchvision model
YosuaMichael bd8b1a8
Fix typo missing underscore
YosuaMichael 6c765a5
raise exception instead of torch._assert, add back publication year (…
YosuaMichael 3326e88
Merge branch 'main' into add-swag-weight
YosuaMichael e444c5a
Add license information on meta and readme
YosuaMichael a6ee605
Merge branch 'add-swag-weight' of github.com:pytorch/vision into add-…
YosuaMichael 54aa8cf
Improve wording and fix typo for pretrained model license in readme
YosuaMichael f9c32eb
Add vit_l_16 weight
YosuaMichael 4cf4eff
Update README.rst
YosuaMichael 9230f40
Update the accuracy meta on vit_l_16_swag model to result from our ex…
YosuaMichael ce6eb3e
Add vit_h_14_swag model
YosuaMichael ff76a53
Add accuracy from experiments
YosuaMichael e874548
Add to vit_h_16 model to hubconf.py
YosuaMichael 2ca4ac4
Add docs and expected pkl file for test
YosuaMichael c806fb1
Merge branch 'main' into add-vit-swag-huge
YosuaMichael 9ff5a76
Merge branch 'main' into add-vit-swag-huge
datumbox 9f603d6
Remove legacy compatibility for ViT_H_14 model
YosuaMichael dd21912
Merge branch 'main' into add-vit-swag-huge
YosuaMichael e4062f4
Merge branch 'main' into add-vit-swag-huge
YosuaMichael 02be296
Test vit_h_14 with smaller image_size to speedup the test
YosuaMichael 87e6c2a
Merge branch 'main' into add-vit-swag-huge
YosuaMichael 696201f
Merge branch 'main' into add-vit-swag-huge
YosuaMichael File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,5 @@ | |
vit_b_32, | ||
vit_l_16, | ||
vit_l_32, | ||
vit_h_14, | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datumbox this according to your suggestions on changing the input image_size for the test on vit_h_14 models to speed up the test. The image_size need to be a multiple of patch_size which is 14, hence we use image_size of 56.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reducing the image_size, there is a speedup although not a lot. I observed that the speedup is around 1.5s - 2s for each gpu and cpu test of the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very interesting. Does this mean that the majority of the time is spent of the model initialization or on the JIT-script parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datumbox I did a bit profiling locally and here are the results :
Seems like around 35% of the time is on building the model, and another 45% of the time is for check_jit_scriptable.