[Refactor] Refator ViT (Continue #295)#395
Merged
mzr1996 merged 23 commits intoopen-mmlab:masterfrom Oct 18, 2021
Merged
Conversation
Closed
Codecov Report
@@ Coverage Diff @@
## master #395 +/- ##
==========================================
+ Coverage 77.96% 78.51% +0.54%
==========================================
Files 102 102
Lines 5619 5612 -7
Branches 923 915 -8
==========================================
+ Hits 4381 4406 +25
+ Misses 1111 1087 -24
+ Partials 127 119 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
472c97a to
885a4f2
Compare
Merged
6 tasks
c97350a to
a6a7655
Compare
Member
Author
6 tasks
33f1ae8 to
be4bd58
Compare
input format of ViT head.
073de79 to
213b172
Compare
6 tasks
Ezra-Yu
reviewed
Oct 15, 2021
mzr1996
added a commit
to mzr1996/mmpretrain
that referenced
this pull request
Nov 24, 2022
* [Squash] Refator ViT (from open-mmlab#295) * Use base variable to simplify auto_aug setting * Use common PatchEmbed, remove HybridEmbed and refactor ViT init structure. * Add `output_cls_token` option and change the output format of ViT and input format of ViT head. * Update unit tests and add test for `output_cls_token`. * Support out_indices. * Standardize config files * Support resize position embedding. * Add readme file of vit * Rename config file * Improve docs about ViT. * Update docstring * Use local version `MultiheadAttention` instead of mmcv version. * Fix MultiheadAttention * Support `qk_scale` argument in `MultiheadAttention` * Improve docs and change `layer_cfg` to `layer_cfgs` and support sequence. * Use init_cfg to init Linear layer in VisionTransformerHead * update metafile * Update checkpoints and configs * Imporve docstring. * Update README * Revert GAP modification.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
This PR is the update of PR #295, to refactor vit backbone.
Modification
Based on #295, continue to work.
BC-breaking (Optional)
ViT structure is changed, old config and checkpoint will be broken.
Checklist
Before PR:
After PR: